public static int constructor(IntPtr l)
    {
        int result;

        try
        {
            int num = LuaDLL.lua_gettop(l);
            if (num == 1)
            {
                OrderReward o = new OrderReward();
                LuaObject.pushValue(l, true);
                LuaObject.pushValue(l, o);
                result = 2;
            }
            else if (num == 2)
            {
                string orderId;
                LuaObject.checkType(l, 2, out orderId);
                OrderReward o = new OrderReward(orderId);
                LuaObject.pushValue(l, true);
                LuaObject.pushValue(l, o);
                result = 2;
            }
            else
            {
                result = LuaObject.error(l, "New object failed.");
            }
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Ejemplo n.º 2
0
 // 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));
     }
 }
    public static int get_OrderId(IntPtr l)
    {
        int result;

        try
        {
            OrderReward orderReward = (OrderReward)LuaObject.checkSelf(l);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, orderReward.OrderId);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int FromPB_s(IntPtr l)
    {
        int result;

        try
        {
            ProOrderReward pbOrderReward;
            LuaObject.checkType <ProOrderReward>(l, 1, out pbOrderReward);
            OrderReward o = OrderReward.FromPB(pbOrderReward);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, o);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int ToPB_s(IntPtr l)
    {
        int result;

        try
        {
            OrderReward orderReward;
            LuaObject.checkType <OrderReward>(l, 1, out orderReward);
            ProOrderReward o = OrderReward.ToPB(orderReward);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, o);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int set_OrderId(IntPtr l)
    {
        int result;

        try
        {
            OrderReward orderReward = (OrderReward)LuaObject.checkSelf(l);
            string      orderId;
            LuaObject.checkType(l, 2, out orderId);
            orderReward.OrderId = orderId;
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int set_Rewards(IntPtr l)
    {
        int result;

        try
        {
            OrderReward  orderReward = (OrderReward)LuaObject.checkSelf(l);
            List <Goods> rewards;
            LuaObject.checkType <List <Goods> >(l, 2, out rewards);
            orderReward.Rewards = rewards;
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int FindOrderReward(IntPtr l)
    {
        int result;

        try
        {
            DataSectionGiftStore dataSectionGiftStore = (DataSectionGiftStore)LuaObject.checkSelf(l);
            string orderId;
            LuaObject.checkType(l, 2, out orderId);
            OrderReward o = dataSectionGiftStore.FindOrderReward(orderId);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, o);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int FindOrderReward(IntPtr l)
    {
        int result;

        try
        {
            GiftStoreComponentCommon giftStoreComponentCommon = (GiftStoreComponentCommon)LuaObject.checkSelf(l);
            string orderId;
            LuaObject.checkType(l, 2, out orderId);
            OrderReward o = giftStoreComponentCommon.FindOrderReward(orderId);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, o);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Ejemplo n.º 10
0
    public static int __callBase_FindOrderReward(IntPtr l)
    {
        int result;

        try
        {
            GiftStoreComponent giftStoreComponent = (GiftStoreComponent)LuaObject.checkSelf(l);
            string             orderId;
            LuaObject.checkType(l, 2, out orderId);
            OrderReward o = giftStoreComponent.m_luaExportHelper.__callBase_FindOrderReward(orderId);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, o);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
 // Token: 0x06013688 RID: 79496 RVA: 0x004F23A0 File Offset: 0x004F05A0
 protected void OnPullOrderRewardAck(int result, string orderId, OrderReward orderReward)
 {
     base.Result = result;
     this.Reward = orderReward;
     this.OnTransactionComplete();
 }
Ejemplo n.º 12
0
 // Token: 0x06007033 RID: 28723 RVA: 0x001F5A78 File Offset: 0x001F3C78
 public void __callBase_AddOrderReward(string orderId, OrderReward reward)
 {
     this.m_owner.__callBase_AddOrderReward(orderId, reward);
 }
Ejemplo n.º 13
0
 // Token: 0x0600701F RID: 28703 RVA: 0x001F5768 File Offset: 0x001F3968
 private void __callBase_AddOrderReward(string orderId, OrderReward reward)
 {
     base.AddOrderReward(orderId, reward);
 }