public void Set(string iname, GiftTypes giftTipe, int rarity, int num) { this.iname = iname; this.type = giftTipe; this.rarity = rarity; this.num = num; }
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); } }
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); }
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); }
public void SetGiftTypeIncluded(GiftTypes flag) { this.giftTypes |= (long)flag; }
public bool CheckGiftTypeIncluded(GiftTypes flag) { return(((GiftTypes)this.giftTypes & flag) != (GiftTypes)0); }
public void SetGiftTypes(GiftTypes flag) { this.m_Type |= (long)flag; }
public bool CheckGiftTypes(GiftTypes flag) { return(((GiftTypes)this.m_Type & flag) != (GiftTypes)0); }
public FirstChargeReward(string _iname, GiftTypes _type, int _num) { this.m_Iname = _iname; this.SetGiftTypes(_type); this.m_Num = _num; }