Esempio n. 1
0
    public static int constructor(IntPtr l)
    {
        int result;

        try
        {
            GoodsType goodsTypeId;
            LuaObject.checkEnum <GoodsType>(l, 2, out goodsTypeId);
            int contentId;
            LuaObject.checkType(l, 3, out contentId);
            int nums;
            LuaObject.checkType(l, 4, out nums);
            ulong instanceId;
            LuaObject.checkType(l, 5, out instanceId);
            BagItemBase o = new BagItemBase(goodsTypeId, contentId, nums, instanceId);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, o);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Esempio n. 2
0
        // Token: 0x0601045A RID: 66650 RVA: 0x0043FFA8 File Offset: 0x0043E1A8
        public void InitExpItem(BagItemBase bagItem, float delay, float interval, Action eventOnLongPress)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_InitExpItemBagItemBaseSingleSingleAction_hotfix != null)
            {
                this.m_InitExpItemBagItemBaseSingleSingleAction_hotfix.call(new object[]
                {
                    this,
                    bagItem,
                    delay,
                    interval,
                    eventOnLongPress
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            base.gameObject.SetActive(true);
            this.BagItem = bagItem;
            ConfigDataItemInfo itemInfo = bagItem.ItemInfo;

            if (itemInfo != null)
            {
                this.m_iconImage.sprite  = AssetUtility.Instance.GetSprite(itemInfo.Icon);
                this.m_frameImage.sprite = AssetUtility.Instance.GetSprite(UIUtility.GetGoodsFrameNameByRank(itemInfo.Rank));
            }
            this.m_countText.text = bagItem.Nums.ToString();
            ProjectLPlayerContext projectLPlayerContext = GameManager.Instance.PlayerContext as ProjectLPlayerContext;

            this.AddExpValue      = projectLPlayerContext.GetAdditiveHeroAddExp(itemInfo.FuncTypeParam1);
            this.Interval         = interval;
            this.Delay            = delay;
            this.EventOnLongPress = eventOnLongPress;
        }
Esempio n. 3
0
    public static int CreateInstanceBagItemByServer(IntPtr l)
    {
        int result;

        try
        {
            BagItemFactory bagItemFactory = (BagItemFactory)LuaObject.checkSelf(l);
            GoodsType      goodsTypeId;
            LuaObject.checkEnum <GoodsType>(l, 2, out goodsTypeId);
            int contentId;
            LuaObject.checkType(l, 3, out contentId);
            int nums;
            LuaObject.checkType(l, 4, out nums);
            ulong instanceId;
            LuaObject.checkType(l, 5, out instanceId);
            BagItemBase o = bagItemFactory.CreateInstanceBagItemByServer(goodsTypeId, contentId, nums, instanceId);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, o);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
        // Token: 0x06007793 RID: 30611 RVA: 0x0020A0E4 File Offset: 0x002082E4
        public int GetCurrentTicketNums()
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_GetCurrentTicketNums_hotfix != null)
            {
                return(Convert.ToInt32(this.m_GetCurrentTicketNums_hotfix.call(new object[]
                {
                    this
                })));
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            int         ticketId    = this.m_bag.GetTicketId(GameFunctionType.GameFunctionType_ThearchyTrial);
            BagItemBase bagItemBase = this.m_bag.FindBagItemByType(GoodsType.GoodsType_Item, ticketId);

            return((bagItemBase != null) ? bagItemBase.Nums : 0);
        }
Esempio n. 5
0
    public static int get_GoodsTypeId(IntPtr l)
    {
        int result;

        try
        {
            BagItemBase bagItemBase = (BagItemBase)LuaObject.checkSelf(l);
            LuaObject.pushValue(l, true);
            LuaObject.pushEnum(l, (int)bagItemBase.GoodsTypeId);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Esempio n. 6
0
    public static int get_EnchantStoneInfo(IntPtr l)
    {
        int result;

        try
        {
            BagItemBase bagItemBase = (BagItemBase)LuaObject.checkSelf(l);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, bagItemBase.EnchantStoneInfo);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Esempio n. 7
0
    public static int ToPBGoods(IntPtr l)
    {
        int result;

        try
        {
            BagItemBase bagItemBase = (BagItemBase)LuaObject.checkSelf(l);
            ProGoods    o           = bagItemBase.ToPBGoods();
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, o);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Esempio n. 8
0
    public static int PBGoodsListToGoodsList_s(IntPtr l)
    {
        int result;

        try
        {
            List <ProGoods> pbGoodsList;
            LuaObject.checkType <List <ProGoods> >(l, 1, out pbGoodsList);
            List <Goods> o = BagItemBase.PBGoodsListToGoodsList(pbGoodsList);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, o);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Esempio n. 9
0
    public static int BagItemsToPBGoods_s(IntPtr l)
    {
        int result;

        try
        {
            List <BagItemBase> bagItems;
            LuaObject.checkType <List <BagItemBase> >(l, 1, out bagItems);
            List <ProGoods> o = BagItemBase.BagItemsToPBGoods(bagItems);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, o);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Esempio n. 10
0
    public static int IsMoney_s(IntPtr l)
    {
        int result;

        try
        {
            GoodsType goodsType;
            LuaObject.checkEnum <GoodsType>(l, 1, out goodsType);
            bool b = BagItemBase.IsMoney(goodsType);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, b);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Esempio n. 11
0
    public static int PBGoodsToGoods_s(IntPtr l)
    {
        int result;

        try
        {
            ProGoods pbGoods;
            LuaObject.checkType <ProGoods>(l, 1, out pbGoods);
            Goods o = BagItemBase.PBGoodsToGoods(pbGoods);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, o);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Esempio n. 12
0
    public static int set_GoodsTypeId(IntPtr l)
    {
        int result;

        try
        {
            BagItemBase bagItemBase = (BagItemBase)LuaObject.checkSelf(l);
            GoodsType   goodsTypeId;
            LuaObject.checkEnum <GoodsType>(l, 2, out goodsTypeId);
            bagItemBase.GoodsTypeId = goodsTypeId;
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Esempio n. 13
0
    public static int set_InstanceId(IntPtr l)
    {
        int result;

        try
        {
            BagItemBase bagItemBase = (BagItemBase)LuaObject.checkSelf(l);
            ulong       instanceId;
            LuaObject.checkType(l, 2, out instanceId);
            bagItemBase.InstanceId = instanceId;
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Esempio n. 14
0
    public static int set_Nums(IntPtr l)
    {
        int result;

        try
        {
            BagItemBase bagItemBase = (BagItemBase)LuaObject.checkSelf(l);
            int         nums;
            LuaObject.checkType(l, 2, out nums);
            bagItemBase.Nums = nums;
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int FindBagItem(IntPtr l)
    {
        int result;

        try
        {
            int num = LuaDLL.lua_gettop(l);
            if (num == 2)
            {
                DataSectionBag dataSectionBag = (DataSectionBag)LuaObject.checkSelf(l);
                ulong          instanceId;
                LuaObject.checkType(l, 2, out instanceId);
                BagItemBase o = dataSectionBag.FindBagItem(instanceId);
                LuaObject.pushValue(l, true);
                LuaObject.pushValue(l, o);
                result = 2;
            }
            else if (num == 3)
            {
                DataSectionBag dataSectionBag2 = (DataSectionBag)LuaObject.checkSelf(l);
                GoodsType      goodsTypeId;
                LuaObject.checkEnum <GoodsType>(l, 2, out goodsTypeId);
                int contentId;
                LuaObject.checkType(l, 3, out contentId);
                BagItemBase o2 = dataSectionBag2.FindBagItem(goodsTypeId, contentId);
                LuaObject.pushValue(l, true);
                LuaObject.pushValue(l, o2);
                result = 2;
            }
            else
            {
                LuaObject.pushValue(l, false);
                LuaDLL.lua_pushstring(l, "No matched override function FindBagItem to call");
                result = 2;
            }
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Esempio n. 16
0
    public static int CreateInstanceBagItemByClient(IntPtr l)
    {
        int result;

        try
        {
            BagItemFactory bagItemFactory = (BagItemFactory)LuaObject.checkSelf(l);
            ProGoods       pbGoods;
            LuaObject.checkType <ProGoods>(l, 2, out pbGoods);
            BagItemBase o = bagItemFactory.CreateInstanceBagItemByClient(pbGoods);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, o);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Esempio n. 17
0
    public static int IsThisGoodsType(IntPtr l)
    {
        int result;

        try
        {
            BagItemBase bagItemBase = (BagItemBase)LuaObject.checkSelf(l);
            GoodsType   goodsType;
            LuaObject.checkEnum <GoodsType>(l, 2, out goodsType);
            bool b = bagItemBase.IsThisGoodsType(goodsType);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, b);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Esempio n. 18
0
    public static int IsEnough(IntPtr l)
    {
        int result;

        try
        {
            BagItemBase bagItemBase = (BagItemBase)LuaObject.checkSelf(l);
            int         consumeNums;
            LuaObject.checkType(l, 2, out consumeNums);
            bool b = bagItemBase.IsEnough(consumeNums);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, b);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Esempio n. 19
0
    public static int PBGoodsToBagItem_s(IntPtr l)
    {
        int result;

        try
        {
            BagItemFactory bagItemFactory;
            LuaObject.checkType <BagItemFactory>(l, 1, out bagItemFactory);
            ProGoods pbGoods;
            LuaObject.checkType <ProGoods>(l, 2, out pbGoods);
            BagItemBase o = BagItemBase.PBGoodsToBagItem(bagItemFactory, pbGoods);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, o);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Esempio n. 20
0
    public static int PBGoodsToBagItems_s(IntPtr l)
    {
        int result;

        try
        {
            BagItemFactory bagItemFactory;
            LuaObject.checkType <BagItemFactory>(l, 1, out bagItemFactory);
            List <ProGoods> goodsList;
            LuaObject.checkType <List <ProGoods> >(l, 2, out goodsList);
            List <BagItemBase> o = BagItemBase.PBGoodsToBagItems(bagItemFactory, goodsList);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, o);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int RemoveBagItem(IntPtr l)
    {
        int result;

        try
        {
            DataSectionBag dataSectionBag = (DataSectionBag)LuaObject.checkSelf(l);
            BagItemBase    bagItem;
            LuaObject.checkType <BagItemBase>(l, 2, out bagItem);
            int nums;
            LuaObject.checkType(l, 3, out nums);
            BagItemBase o = dataSectionBag.RemoveBagItem(bagItem, nums);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, o);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Esempio n. 22
0
        // Token: 0x0600E5DE RID: 58846 RVA: 0x003DB7A8 File Offset: 0x003D99A8
        public void SetGiftItemInfo(BagItemBase bagItem, int heroId)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetGiftItemInfoBagItemBaseInt32_hotfix != null)
            {
                this.m_SetGiftItemInfoBagItemBaseInt32_hotfix.call(new object[]
                {
                    this,
                    bagItem,
                    heroId
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            base.gameObject.SetActive(true);
            if (bagItem == null)
            {
                return;
            }
            this.BagItem              = bagItem;
            this.m_image.sprite       = AssetUtility.Instance.GetSprite(bagItem.ItemInfo.Icon);
            this.m_countText.text     = bagItem.Nums.ToString();
            this.m_rankBgImage.sprite = AssetUtility.Instance.GetSprite(UIUtility.GetGoodsFrameName(bagItem.GoodsTypeId, bagItem.ContentId));
            AddHeroFavorabilityUseableBagItem addHeroFavorabilityUseableBagItem = bagItem as AddHeroFavorabilityUseableBagItem;
            int num = addHeroFavorabilityUseableBagItem.CalculateAddFavorabilityExp(heroId);

            this.m_addGo.SetActive(num > addHeroFavorabilityUseableBagItem.NormalAddExp);
            ProjectLPlayerContext projectLPlayerContext = GameManager.Instance.PlayerContext as ProjectLPlayerContext;

            num = projectLPlayerContext.GetAdditiveHeroFavourabilityAddExp(num);
            this.AddExpValue = num;
            int bagItemCountByInstanceId = projectLPlayerContext.GetBagItemCountByInstanceId(bagItem.InstanceId);

            this.m_goods = new Goods
            {
                GoodsType = bagItem.GoodsTypeId,
                Id        = bagItem.ContentId,
                Count     = bagItemCountByInstanceId
            };
        }
 // Token: 0x0600A2F0 RID: 41712 RVA: 0x002DE510 File Offset: 0x002DC710
 public void SetBagItemInfo(BagItemBase bagItem)
 {
     if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetBagItemInfoBagItemBase_hotfix != null)
     {
         this.m_SetBagItemInfoBagItemBase_hotfix.call(new object[]
         {
             this,
             bagItem
         });
         return;
     }
     BJLuaObjHelper.IsSkipLuaHotfix = false;
     base.gameObject.SetActive(true);
     base.gameObject.name    = bagItem.ListItemName;
     this.BagItem            = bagItem;
     this.m_itemInfo         = bagItem.ItemInfo;
     this.m_jobMaterialInfo  = bagItem.JobMaterialInfo;
     this.m_equipmentInfo    = bagItem.EquipmentInfo;
     this.m_enchantStoneInfo = bagItem.EnchantStoneInfo;
     this.m_countText.text   = bagItem.Nums.ToString();
     this.SetItemInfoByType(bagItem.GoodsTypeId);
 }
Esempio n. 24
0
        // Token: 0x0600FB53 RID: 64339 RVA: 0x00421884 File Offset: 0x0041FA84
        public void InitEquipmentDepotListItemInfo(BagItemBase bagItem, bool canWear)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_InitEquipmentDepotListItemInfoBagItemBaseBoolean_hotfix != null)
            {
                this.m_InitEquipmentDepotListItemInfoBagItemBaseBoolean_hotfix.call(new object[]
                {
                    this,
                    bagItem,
                    canWear
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            base.gameObject.SetActive(true);
            base.gameObject.name = bagItem.ListItemName;
            this.BagItem         = bagItem;
            EquipmentBagItem    equipmentBagItem    = bagItem as EquipmentBagItem;
            EnchantStoneBagItem enchantStoneBagItem = bagItem as EnchantStoneBagItem;

            this.EquipmentInstanceId = this.BagItem.InstanceId;
            if (equipmentBagItem != null)
            {
                ConfigDataEquipmentInfo equipmentInfo = equipmentBagItem.EquipmentInfo;
                this.m_icon.sprite    = AssetUtility.Instance.GetSprite(equipmentInfo.Icon);
                this.m_bgFrame.sprite = AssetUtility.Instance.GetSprite(UIUtility.GetGoodsFrameNameByRank(equipmentInfo.Rank));
                this.m_SSREffect.SetActive(UIUtility.IsRankSSR(equipmentInfo.Rank));
                UIUtility.SetGameObjectChildrenActiveCount(this.m_starGroup, equipmentBagItem.StarLevel);
                this.m_lvValueText.text = equipmentBagItem.Level.ToString();
                ProjectLPlayerContext projectLPlayerContext = GameManager.Instance.PlayerContext as ProjectLPlayerContext;
                IConfigDataLoader     configDataLoader      = GameManager.Instance.ConfigDataLoader as IConfigDataLoader;
                int wearedEquipmentHeroIdByEquipmentId      = projectLPlayerContext.GetWearedEquipmentHeroIdByEquipmentId(this.EquipmentInstanceId);
                this.IsEquiped = (wearedEquipmentHeroIdByEquipmentId > 0);
                if (this.IsEquiped)
                {
                    ConfigDataHeroInfo      configDataHeroInfo = configDataLoader.GetConfigDataHeroInfo(wearedEquipmentHeroIdByEquipmentId);
                    ConfigDataCharImageInfo charImageInfo      = configDataHeroInfo.GetCharImageInfo(configDataHeroInfo.Star);
                    if (charImageInfo != null)
                    {
                        this.m_equipingTagHeadIcon.sprite = AssetUtility.Instance.GetSprite(charImageInfo.SmallHeadImage);
                    }
                    this.m_stateCtrl.SetToUIState("Equiped", false, true);
                }
                else
                {
                    this.m_stateCtrl.SetToUIState("UnEquiped", false, true);
                }
                this.m_lockImage.SetActive(equipmentBagItem.Locked);
                this.m_mask.SetActive(!canWear);
                this.m_enchantmentIcon.gameObject.SetActive(equipmentBagItem.IsEnchant());
                if (equipmentBagItem.IsEnchant())
                {
                    ConfigDataResonanceInfo configDataResonanceInfo = configDataLoader.GetConfigDataResonanceInfo(equipmentBagItem.ResonanceId);
                    this.m_enchantmentIcon.sprite = AssetUtility.Instance.GetSprite(configDataResonanceInfo.SmallIcon);
                }
            }
            else
            {
                ConfigDataEnchantStoneInfo enchantStoneInfo = enchantStoneBagItem.EnchantStoneInfo;
                this.m_icon.sprite    = AssetUtility.Instance.GetSprite(enchantStoneInfo.Icon);
                this.m_bgFrame.sprite = AssetUtility.Instance.GetSprite(UIUtility.GetGoodsFrameNameByRank(enchantStoneInfo.Rank));
                this.m_SSREffect.SetActive(UIUtility.IsRankSSR(enchantStoneInfo.Rank));
                this.m_countText.text = UIUtility.GetGoodsCount(this.BagItem.GoodsTypeId, this.BagItem.ContentId).ToString();
                this.m_stateCtrl.SetToUIState("Enchant", false, true);
                this.m_enchantmentIcon.gameObject.SetActive(false);
                this.m_checkImageMask.SetActive(false);
            }
        }
Esempio n. 25
0
 // Token: 0x06007660 RID: 30304 RVA: 0x00205F68 File Offset: 0x00204168
 private void __callBase_OnCreateBagItemEventCallBack(BagItemBase bagItem)
 {
     base.OnCreateBagItemEventCallBack(bagItem);
 }
Esempio n. 26
0
 // Token: 0x06007677 RID: 30327 RVA: 0x00206280 File Offset: 0x00204480
 public void __callBase_OnCreateBagItemEventCallBack(BagItemBase bagItem)
 {
     this.m_owner.__callBase_OnCreateBagItemEventCallBack(bagItem);
 }