示例#1
0
    public static int get_Id(IntPtr l)
    {
        int result;

        try
        {
            RandomStoreItem randomStoreItem = (RandomStoreItem)LuaObject.checkSelf(l);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, randomStoreItem.Id);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
示例#2
0
    public static int constructor(IntPtr l)
    {
        int result;

        try
        {
            RandomStoreItem o = new RandomStoreItem();
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, o);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
示例#3
0
    public static int PBStoreItemToStoreItem_s(IntPtr l)
    {
        int result;

        try
        {
            ProRandomStoreItem pbStoreItem;
            LuaObject.checkType <ProRandomStoreItem>(l, 1, out pbStoreItem);
            RandomStoreItem o = RandomStoreItem.PBStoreItemToStoreItem(pbStoreItem);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, o);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
示例#4
0
    public static int set_Bought(IntPtr l)
    {
        int result;

        try
        {
            RandomStoreItem randomStoreItem = (RandomStoreItem)LuaObject.checkSelf(l);
            bool            bought;
            LuaObject.checkType(l, 2, out bought);
            randomStoreItem.Bought = bought;
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
        // Token: 0x060075BD RID: 30141 RVA: 0x0020401C File Offset: 0x0020221C
        public int BuyStoreItem(int storeId, int index)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_BuyStoreItemInt32Int32_hotfix != null)
            {
                return(Convert.ToInt32(this.m_BuyStoreItemInt32Int32_hotfix.call(new object[]
                {
                    this,
                    storeId,
                    index
                })));
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            RandomStore randomStore = this.m_randomStoreDS.FindStore(storeId);

            if (randomStore == null)
            {
                return(-1100);
            }
            if (index < 0 || index >= randomStore.Items.Count)
            {
                return(-1101);
            }
            RandomStoreItem storeItem = this.m_randomStoreDS.GetStoreItem(randomStore, index);

            if (base.IsBoughtStoreItem(storeItem))
            {
                return(-1102);
            }
            ConfigDataRandomStoreItemInfo configDataRandomStoreItemInfo = this.m_configDataLoader.GetConfigDataRandomStoreItemInfo(storeItem.Id);
            int num = this.m_basicInfo.IsCurrencyEnough(configDataRandomStoreItemInfo.CurrencyType, configDataRandomStoreItemInfo.Price);

            if (num != 0)
            {
                return(num);
            }
            this.m_basicInfo.AddCurrency(configDataRandomStoreItemInfo.CurrencyType, -configDataRandomStoreItemInfo.Price, GameFunctionType.GameFunctionType_None, null);
            this.m_randomStoreDS.BuyStoreItem(storeItem);
            base.OnBuyStoreItem(storeId, storeItem.Id);
            return(storeItem.Id);
        }
示例#6
0
    public static int GetStoreItem(IntPtr l)
    {
        int result;

        try
        {
            DataSectionRandomStore dataSectionRandomStore = (DataSectionRandomStore)LuaObject.checkSelf(l);
            RandomStore            store;
            LuaObject.checkType <RandomStore>(l, 2, out store);
            int index;
            LuaObject.checkType(l, 3, out index);
            RandomStoreItem storeItem = dataSectionRandomStore.GetStoreItem(store, index);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, storeItem);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
 // Token: 0x060075D7 RID: 30167 RVA: 0x00204534 File Offset: 0x00202734
 public bool __callBase_IsBoughtStoreItem(RandomStoreItem storeItem)
 {
     return(this.m_owner.__callBase_IsBoughtStoreItem(storeItem));
 }
 // Token: 0x060075C8 RID: 30152 RVA: 0x002041E0 File Offset: 0x002023E0
 private bool __callBase_IsBoughtStoreItem(RandomStoreItem storeItem)
 {
     return(base.IsBoughtStoreItem(storeItem));
 }