// Token: 0x0600700C RID: 28684 RVA: 0x001F52E8 File Offset: 0x001F34E8 public void DeSerialize(DSGiftStoreNtf msg) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_DeSerializeDSGiftStoreNtf_hotfix != null) { this.m_DeSerializeDSGiftStoreNtf_hotfix.call(new object[] { this, msg }); return; } BJLuaObjHelper.IsSkipLuaHotfix = false; this.m_giftStoreDS.ClearInitedData(); this.m_giftStoreDS.InitVersion((ushort)msg.Version, (ushort)msg.Version); foreach (ProGiftStoreFirstBoughtRecord proGiftStoreFirstBoughtRecord in msg.Records) { this.m_giftStoreDS.InitFirstBuyGoodsRecord(proGiftStoreFirstBoughtRecord.GoodsId, proGiftStoreFirstBoughtRecord.GoodsRegisterId); } foreach (ProGiftStoreItem pbItem in msg.BoughtItems) { GiftStoreItem giftStoreItem = GiftStoreItem.FromPB(pbItem); giftStoreItem.Config = this.m_configDataLoader.GetConfigDataGiftStoreItemInfo(giftStoreItem.GoodsId); this.m_giftStoreDS.InitBoughtItem(giftStoreItem); } foreach (ProOrderReward pbOrderReward in msg.OrderRewards) { this.m_giftStoreDS.InitOrderReward(OrderReward.FromPB(pbOrderReward)); } }
// Token: 0x0600700B RID: 28683 RVA: 0x001F521C File Offset: 0x001F341C public bool IsGiftStoreItemSellOut(GiftStoreItem item) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_IsGiftStoreItemSellOutGiftStoreItem_hotfix != null) { return(Convert.ToBoolean(this.m_IsGiftStoreItemSellOutGiftStoreItem_hotfix.call(new object[] { this, item }))); } BJLuaObjHelper.IsSkipLuaHotfix = false; ConfigDataGiftStoreItemInfo configDataGiftStoreItemInfo = this.m_configDataLoader.GetConfigDataGiftStoreItemInfo(item.GoodsId); DateTime currentTime = this.m_basicInfo.GetCurrentTime(); return(item.NextFlushTime > currentTime && configDataGiftStoreItemInfo.Count != 0 && item.BoughtNums >= configDataGiftStoreItemInfo.Count); }
public static int constructor(IntPtr l) { int result; try { GiftStoreItem o = new GiftStoreItem(); LuaObject.pushValue(l, true); LuaObject.pushValue(l, o); result = 2; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
public static int get_GoodsId(IntPtr l) { int result; try { GiftStoreItem giftStoreItem = (GiftStoreItem)LuaObject.checkSelf(l); LuaObject.pushValue(l, true); LuaObject.pushValue(l, giftStoreItem.GoodsId); result = 2; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
public static int FromPB_s(IntPtr l) { int result; try { ProGiftStoreItem pbItem; LuaObject.checkType <ProGiftStoreItem>(l, 1, out pbItem); GiftStoreItem o = GiftStoreItem.FromPB(pbItem); LuaObject.pushValue(l, true); LuaObject.pushValue(l, o); result = 2; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
public static int set_Config(IntPtr l) { int result; try { GiftStoreItem giftStoreItem = (GiftStoreItem)LuaObject.checkSelf(l); ConfigDataGiftStoreItemInfo config; LuaObject.checkType <ConfigDataGiftStoreItemInfo>(l, 2, out config); giftStoreItem.Config = config; LuaObject.pushValue(l, true); result = 1; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
public static int ToPB_s(IntPtr l) { int result; try { GiftStoreItem item; LuaObject.checkType <GiftStoreItem>(l, 1, out item); ProGiftStoreItem o = GiftStoreItem.ToPB(item); LuaObject.pushValue(l, true); LuaObject.pushValue(l, o); result = 2; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
public static int set_SaleEndTime(IntPtr l) { int result; try { GiftStoreItem giftStoreItem = (GiftStoreItem)LuaObject.checkSelf(l); DateTime saleEndTime; LuaObject.checkValueType <DateTime>(l, 2, out saleEndTime); giftStoreItem.SaleEndTime = saleEndTime; LuaObject.pushValue(l, true); result = 1; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
public static int set_BoughtNums(IntPtr l) { int result; try { GiftStoreItem giftStoreItem = (GiftStoreItem)LuaObject.checkSelf(l); int boughtNums; LuaObject.checkType(l, 2, out boughtNums); giftStoreItem.BoughtNums = boughtNums; LuaObject.pushValue(l, true); result = 1; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
public static int set_IsFirstBuy(IntPtr l) { int result; try { GiftStoreItem giftStoreItem = (GiftStoreItem)LuaObject.checkSelf(l); bool isFirstBuy; LuaObject.checkType(l, 2, out isFirstBuy); giftStoreItem.IsFirstBuy = isFirstBuy; LuaObject.pushValue(l, true); result = 1; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
public static int FindLocalBoughtItemById(IntPtr l) { int result; try { DataSectionGiftStore dataSectionGiftStore = (DataSectionGiftStore)LuaObject.checkSelf(l); int goodsId; LuaObject.checkType(l, 2, out goodsId); GiftStoreItem o = dataSectionGiftStore.FindLocalBoughtItemById(goodsId); LuaObject.pushValue(l, true); LuaObject.pushValue(l, o); result = 2; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
// Token: 0x0600700E RID: 28686 RVA: 0x001F5578 File Offset: 0x001F3778 public void BuyGoods(int goodsId, string registerId, int boughtNums, long nextFlushTime) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_BuyGoodsInt32StringInt32Int64_hotfix != null) { this.m_BuyGoodsInt32StringInt32Int64_hotfix.call(new object[] { this, goodsId, registerId, boughtNums, nextFlushTime }); return; } BJLuaObjHelper.IsSkipLuaHotfix = false; GiftStoreItem giftStoreItem = this.m_giftStoreDS.FindLocalBoughtItemById(goodsId); if (giftStoreItem == null) { giftStoreItem = new GiftStoreItem(); giftStoreItem.Config = this.m_configDataLoader.GetConfigDataGiftStoreItemInfo(goodsId); giftStoreItem.GoodsId = goodsId; giftStoreItem.BoughtNums = boughtNums; giftStoreItem.NextFlushTime = new DateTime(nextFlushTime); this.m_giftStoreDS.AddBoughtItem(giftStoreItem); } else { giftStoreItem.BoughtNums = boughtNums; giftStoreItem.NextFlushTime = new DateTime(nextFlushTime); this.m_giftStoreDS.SetDirty(true); } if (!base.HasBought(goodsId)) { base.AddFirstBuyGoodsRecord(goodsId, registerId); } base.OnBuyGiftStoreGoods(giftStoreItem.Config); }