Example #1
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;
        }