Exemplo n.º 1
0
        // Token: 0x06006F6F RID: 28527 RVA: 0x001F2C18 File Offset: 0x001F0E18
        public int CanBuyGoods(int storeId, int goodsId)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_CanBuyGoodsInt32Int32_hotfix != null)
            {
                return(Convert.ToInt32(this.m_CanBuyGoodsInt32Int32_hotfix.call(new object[]
                {
                    this,
                    storeId,
                    goodsId2
                })));
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            int goodsId = goodsId2;
            Dictionary <int, FixedStoreInfo> stores = this.m_configDataLoader.FixedStoreData.Stores;

            if (!stores.ContainsKey(storeId))
            {
                return(-1300);
            }
            if (!stores[storeId].StoreItems.ContainsKey(goodsId))
            {
                return(-1301);
            }
            FixedStoreItem item       = null;
            FixedStore     fixedStore = this.FindStoreById(storeId);

            if (fixedStore != null)
            {
                item = fixedStore.Items.Find((FixedStoreItem t) => t.Id == goodsId);
            }
            ConfigDataFixedStoreItemInfo itemConfig = this.m_configDataLoader.FixedStoreData.Stores[storeId].StoreItems[goodsId];

            return(base.CanBuyFixedStoreItem(itemConfig, item));
        }
Exemplo n.º 2
0
 // Token: 0x06006F6B RID: 28523 RVA: 0x001F29F0 File Offset: 0x001F0BF0
 public void InitStores(List <ProFixedStore> pbStores)
 {
     if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_InitStoresList ` 1_hotfix != null)
     {
         this.m_InitStoresList ` 1_hotfix.call(new object[]
         {
             this,
             pbStores
         });
         return;
     }
     BJLuaObjHelper.IsSkipLuaHotfix = false;
     this.m_fixedStoreDS.ClearInitedData();
     this.m_fixedStoreDS.InitStores(FixedStore.PBFixedStoresToFixedStores(pbStores));
 }
    public static int get_Id(IntPtr l)
    {
        int result;

        try
        {
            FixedStore fixedStore = (FixedStore)LuaObject.checkSelf(l);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, fixedStore.Id);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int constructor(IntPtr l)
    {
        int result;

        try
        {
            FixedStore o = new FixedStore();
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, o);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Exemplo n.º 5
0
 // Token: 0x06006F6E RID: 28526 RVA: 0x001F2B84 File Offset: 0x001F0D84
 public void InitStoreInfo(ProFixedStore pbStore)
 {
     if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_InitStoreInfoProFixedStore_hotfix != null)
     {
         this.m_InitStoreInfoProFixedStore_hotfix.call(new object[]
         {
             this,
             pbStore
         });
         return;
     }
     BJLuaObjHelper.IsSkipLuaHotfix = false;
     if (this.FindStoreById(pbStore.StoreId) == null)
     {
         this.m_fixedStoreDS.InitStore(FixedStore.PBFixedStoreToFixedStore(pbStore));
     }
 }
Exemplo n.º 6
0
        // Token: 0x06006F70 RID: 28528 RVA: 0x001F2D50 File Offset: 0x001F0F50
        public void BuyStoreItem(int storeId, int goodsId, long nextFlushTime, bool isReseted)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_BuyStoreItemInt32Int32Int64Boolean_hotfix != null)
            {
                this.m_BuyStoreItemInt32Int32Int64Boolean_hotfix.call(new object[]
                {
                    this,
                    storeId,
                    goodsId2,
                    nextFlushTime,
                    isReseted
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            int        goodsId    = goodsId2;
            FixedStore fixedStore = this.m_fixedStoreDS.FindStore(storeId);

            if (fixedStore == null)
            {
                fixedStore    = new FixedStore();
                fixedStore.Id = storeId;
                this.m_fixedStoreDS.AddStore(fixedStore);
            }
            ConfigDataFixedStoreItemInfo configDataFixedStoreItemInfo = this.m_configDataLoader.FixedStoreData.Stores[storeId].StoreItems[goodsId];
            FixedStoreItem fixedStoreItem = fixedStore.Items.Find((FixedStoreItem t) => t.Id == goodsId);

            if (fixedStoreItem == null)
            {
                fixedStoreItem             = new FixedStoreItem();
                fixedStoreItem.Id          = goodsId;
                fixedStoreItem.IsFirstBuy  = true;
                fixedStoreItem.BoughtCount = 0;
                fixedStore.Items.Add(fixedStoreItem);
            }
            int num = base.CaculateCurrencyCount(configDataFixedStoreItemInfo, fixedStoreItem.IsFirstBuy);

            this.m_basicInfo.AddCurrency(configDataFixedStoreItemInfo.CurrencyType, -num, GameFunctionType.GameFunctionType_None, null);
            fixedStoreItem.NextFlushTime = nextFlushTime;
            if (isReseted)
            {
                fixedStoreItem.BoughtCount = 0;
            }
            base.BuyStoreItem(storeId, fixedStoreItem, 1);
        }
    public static int FixedStoreToPBFixedStore_s(IntPtr l)
    {
        int result;

        try
        {
            FixedStore store;
            LuaObject.checkType <FixedStore>(l, 1, out store);
            ProFixedStore o = FixedStore.FixedStoreToPBFixedStore(store);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, o);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int PBFixedStoresToFixedStores_s(IntPtr l)
    {
        int result;

        try
        {
            List <ProFixedStore> pbStores;
            LuaObject.checkType <List <ProFixedStore> >(l, 1, out pbStores);
            List <FixedStore> o = FixedStore.PBFixedStoresToFixedStores(pbStores);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, o);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int set_Id(IntPtr l)
    {
        int result;

        try
        {
            FixedStore fixedStore = (FixedStore)LuaObject.checkSelf(l);
            int        id;
            LuaObject.checkType(l, 2, out id);
            fixedStore.Id = id;
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int set_Items(IntPtr l)
    {
        int result;

        try
        {
            FixedStore            fixedStore = (FixedStore)LuaObject.checkSelf(l);
            List <FixedStoreItem> items;
            LuaObject.checkType <List <FixedStoreItem> >(l, 2, out items);
            fixedStore.Items = items;
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Exemplo n.º 11
0
    public static int FindStore(IntPtr l)
    {
        int result;

        try
        {
            DataSectionFixedStore dataSectionFixedStore = (DataSectionFixedStore)LuaObject.checkSelf(l);
            int id;
            LuaObject.checkType(l, 2, out id);
            FixedStore o = dataSectionFixedStore.FindStore(id);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, o);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Exemplo n.º 12
0
    public static int GetStoreOfferingById(IntPtr l)
    {
        int result;

        try
        {
            FixedStoreComponentCommon fixedStoreComponentCommon = (FixedStoreComponentCommon)LuaObject.checkSelf(l);
            int storeId;
            LuaObject.checkType(l, 2, out storeId);
            FixedStore storeOfferingById = fixedStoreComponentCommon.m_luaExportHelper.GetStoreOfferingById(storeId);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, storeOfferingById);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Exemplo n.º 13
0
    public static int __callBase_GetStore(IntPtr l)
    {
        int result;

        try
        {
            FixedStoreComponent fixedStoreComponent = (FixedStoreComponent)LuaObject.checkSelf(l);
            int storeId;
            LuaObject.checkType(l, 2, out storeId);
            FixedStore o = fixedStoreComponent.m_luaExportHelper.__callBase_GetStore(storeId);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, o);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Exemplo n.º 14
0
    public static int FindStoreById(IntPtr l)
    {
        int result;

        try
        {
            FixedStoreComponent fixedStoreComponent = (FixedStoreComponent)LuaObject.checkSelf(l);
            int storeId;
            LuaObject.checkType(l, 2, out storeId);
            FixedStore o = fixedStoreComponent.FindStoreById(storeId);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, o);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }