Esempio n. 1
0
 public void Set(string iname, GiftTypes giftTipe, int rarity, int num)
 {
     this.iname  = iname;
     this.type   = giftTipe;
     this.rarity = rarity;
     this.num    = num;
 }
Esempio n. 2
0
 private void AddReward(string iname, GiftTypes giftTipe, int rarity, int num)
 {
     if (this.GiftRecieveItemDataDic.ContainsKey(iname))
     {
         this.GiftRecieveItemDataDic[iname].num += num;
     }
     else
     {
         GiftRecieveItemData giftRecieveItemData = new GiftRecieveItemData();
         giftRecieveItemData.Set(iname, giftTipe, rarity, num);
         this.GiftRecieveItemDataDic.Add(iname, giftRecieveItemData);
     }
 }
Esempio n. 3
0
 public GiftData Find(GiftTypes giftType)
 {
     if (this.gifts == null)
     {
         return((GiftData)null);
     }
     for (int index = 0; index < this.gifts.Length; ++index)
     {
         if (this.gifts[index].CheckGiftTypeIncluded(giftType))
         {
             return(this.gifts[index]);
         }
     }
     return((GiftData)null);
 }
Esempio n. 4
0
 public bool Contains(GiftTypes giftType)
 {
     if (this.gifts == null)
     {
         return(false);
     }
     for (int index = 0; index < this.gifts.Length; ++index)
     {
         if (this.gifts[index].CheckGiftTypeIncluded(giftType))
         {
             return(true);
         }
     }
     return(false);
 }
Esempio n. 5
0
 public void SetGiftTypeIncluded(GiftTypes flag)
 {
     this.giftTypes |= (long)flag;
 }
Esempio n. 6
0
 public bool CheckGiftTypeIncluded(GiftTypes flag)
 {
     return(((GiftTypes)this.giftTypes & flag) != (GiftTypes)0);
 }
Esempio n. 7
0
 public void SetGiftTypes(GiftTypes flag)
 {
     this.m_Type |= (long)flag;
 }
Esempio n. 8
0
 public bool CheckGiftTypes(GiftTypes flag)
 {
     return(((GiftTypes)this.m_Type & flag) != (GiftTypes)0);
 }
Esempio n. 9
0
 public FirstChargeReward(string _iname, GiftTypes _type, int _num)
 {
     this.m_Iname = _iname;
     this.SetGiftTypes(_type);
     this.m_Num = _num;
 }