// 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; }
// Token: 0x0600F153 RID: 61779 RVA: 0x004023EC File Offset: 0x004005EC protected override void OnBindFiledsCompleted() { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_OnBindFiledsCompleted_hotfix != null) { this.m_OnBindFiledsCompleted_hotfix.call(new object[] { this }); return; } BJLuaObjHelper.IsSkipLuaHotfix = false; base.OnBindFiledsCompleted(); this.m_configDataLoader = (GameManager.Instance.ConfigDataLoader as IConfigDataLoader); this.m_playerContext = (GameManager.Instance.PlayerContext as ProjectLPlayerContext); this.m_guildUITask = (UIUtility.FindUITaskWithType(typeof(GuildUITask)) as GuildUITask); this.m_createButton.onClick.AddListener(new UnityAction(this.OnCreateGuildClick)); this.m_colseButton.onClick.AddListener(new UnityAction(this.OnCloseClick)); this.m_bgButton.onClick.AddListener(new UnityAction(this.OnBGClick)); this.m_forwardLevelButton.onClick.AddListener(new UnityAction(this.OnForwardLevelClick)); this.m_backwardLevelButton.onClick.AddListener(new UnityAction(this.OnBackwardLevelClick)); this.m_levelInputField.onEndEdit.AddListener(new UnityAction <string>(this.OnLevelInputFiledEndEdit)); this.m_guildDeclarationInputField.onEndEdit.AddListener(new UnityAction <string>(this.OnGuildDeclaratioInputFiledEndEdit)); ConfigDataItemInfo configDataItemInfo = this.m_configDataLoader.GetConfigDataItemInfo(this.m_configDataLoader.ConfigableConstId_GuildCreateItemId); this.m_requireItemIamge.sprite = AssetUtility.Instance.GetSprite(configDataItemInfo.Icon); this.m_requireLevel = 1; this.RefreshLevelDisplay(); string text = this.m_configDataLoader.UtilityGetStringByStringTable(StringTableId.StringTableId_DefaultGuildHiringDeclaration); this.m_guildDeclarationInputField.text = text; }
// Token: 0x0600F9FC RID: 63996 RVA: 0x0041CA6C File Offset: 0x0041AC6C private Goods GetSelfChooseGoods(int fixedStoreItemId, int selfChooseIndex) { ConfigDataFixedStoreItemInfo configDataFixedStoreItemInfo = this.m_configDataLoader.GetConfigDataFixedStoreItemInfo(fixedStoreItemId); ConfigDataItemInfo configDataItemInfo = this.m_configDataLoader.GetConfigDataItemInfo(configDataFixedStoreItemInfo.ItemId); ConfigDataSelfSelectedBoxInfo configDataSelfSelectedBoxInfo = this.m_configDataLoader.GetConfigDataSelfSelectedBoxInfo(configDataItemInfo.FuncTypeParam1); return(configDataSelfSelectedBoxInfo.Reward[selfChooseIndex]); }
// Token: 0x0600F9FF RID: 63999 RVA: 0x0041CB28 File Offset: 0x0041AD28 public void OnBuyItemClick() { int num = this.m_playerContext.CanBuyFixedStoreGoods((int)this.m_storeId, this.m_fixedStoreItemId, this.m_selfChooseIndex); if (num == 0) { FixedStoreBuyStoreItemNetTask fixedStoreBuyStoreItemNetTask = new FixedStoreBuyStoreItemNetTask((int)this.m_storeId, this.m_fixedStoreItemId, this.m_selfChooseIndex); fixedStoreBuyStoreItemNetTask.EventOnStop += delegate(Task task) { FixedStoreBuyStoreItemNetTask fixedStoreBuyStoreItemNetTask2 = task as FixedStoreBuyStoreItemNetTask; if (fixedStoreBuyStoreItemNetTask2.Result == 0) { ConfigDataFixedStoreItemInfo configDataFixedStoreItemInfo = this.m_configDataLoader.GetConfigDataFixedStoreItemInfo(this.m_fixedStoreItemId); ConfigDataItemInfo configDataItemInfo = this.m_configDataLoader.GetConfigDataItemInfo(configDataFixedStoreItemInfo.ItemId); if (configDataItemInfo != null && (configDataItemInfo.FuncType == ItemFuncType.ItemFuncType_StaticBox || configDataItemInfo.FuncType == ItemFuncType.ItemFuncType_RandomBox)) { this.HandleBoxOpenNetTask(GoodsType.GoodsType_Item, configDataFixedStoreItemInfo.ItemId, 1, delegate(List <Goods> goods) { GetRewardGoodsUITask.StartUITask(goods); if (this.EventOnBuySuccess != null) { this.EventOnBuySuccess(); } }, delegate { }); } else { List <Goods> storeGoods = this.GetStoreGoods(this.m_fixedStoreItemId, this.m_selfChooseIndex); GetRewardGoodsUITask.StartUITask(storeGoods); if (this.EventOnBuySuccess != null) { this.EventOnBuySuccess(); } } } else { CommonUIController.Instance.ShowErrorMessage(fixedStoreBuyStoreItemNetTask2.Result, 2f, null, true); } }; fixedStoreBuyStoreItemNetTask.Start(null); } else if (num == -500) { BagFullUITask.StartUITask(this.m_normalItemBuyUITask.CurrentIntent); } else if (num == -401) { this.StoreUIController_CrystalNotEnough(); } else { CommonUIController.Instance.ShowErrorMessage(num, 2f, null, true); } }
// Token: 0x0600FA1B RID: 64027 RVA: 0x0041D2B8 File Offset: 0x0041B4B8 public void SetSelfChooseItemBuyPlane(StoreId storeId, int fixedStoreItemId) { this.m_storeId = storeId; this.m_fixedStoreItemId = fixedStoreItemId; ConfigDataFixedStoreItemInfo configDataFixedStoreItemInfo = this.m_configDataLoader.GetConfigDataFixedStoreItemInfo(fixedStoreItemId); ConfigDataItemInfo configDataItemInfo = this.m_configDataLoader.GetConfigDataItemInfo(configDataFixedStoreItemInfo.ItemId); ConfigDataSelfSelectedBoxInfo configDataSelfSelectedBoxInfo = this.m_configDataLoader.GetConfigDataSelfSelectedBoxInfo(configDataItemInfo.FuncTypeParam1); foreach (Goods g in configDataSelfSelectedBoxInfo.Reward) { GoodsUIController item = GoodsUIController.CreateRewardGoods(g, this.m_content, this.m_itemTemplate, true, new Action <GoodsUIController>(this.OnGoodsClick)); this.m_goodUIControllerList.Add(item); } }
// Token: 0x06013696 RID: 79510 RVA: 0x004F25C8 File Offset: 0x004F07C8 public void SetSelfChooseItemID(StoreId storeID, StoreItemUIController storeItemUIController) { UIUtility.SetUIStateOpen(this.m_uiStateController, "Show", null, false, true); foreach (GoodsUIController goodsUIController in this.m_goodUIController) { UnityEngine.Object.Destroy(goodsUIController.gameObject); } this.m_goodUIController.Clear(); this.m_storeItemUIController = storeItemUIController; ConfigDataItemInfo configDataItemInfo = this.m_configDataLoader.GetConfigDataItemInfo(storeItemUIController.m_goodsID); ConfigDataSelfSelectedBoxInfo configDataSelfSelectedBoxInfo = this.m_configDataLoader.GetConfigDataSelfSelectedBoxInfo(configDataItemInfo.FuncTypeParam1); foreach (Goods g in configDataSelfSelectedBoxInfo.Reward) { GoodsUIController item = GoodsUIController.CreateRewardGoods(g, this.m_content, this.m_itemTemplate, true, new Action <GoodsUIController>(this.OnGoodsClick)); this.m_goodUIController.Add(item); } }
// Token: 0x0600FF4B RID: 65355 RVA: 0x0042FDF0 File Offset: 0x0042DFF0 public void InitEquipmentBreakNeedItem(Goods goods) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_InitEquipmentBreakNeedItemGoods_hotfix != null) { this.m_InitEquipmentBreakNeedItemGoods_hotfix.call(new object[] { this, goods }); return; } BJLuaObjHelper.IsSkipLuaHotfix = false; CommonUIStateController component = base.gameObject.GetComponent <CommonUIStateController>(); if (goods == null || goods.GoodsType != GoodsType.GoodsType_Item) { component.SetToUIState("NotHave", false, true); this.m_iconSSREffect.SetActive(false); this.m_goods = null; return; } component.SetToUIState("Have", false, true); this.m_goods = goods; IConfigDataLoader configDataLoader = GameManager.Instance.ConfigDataLoader as IConfigDataLoader; ProjectLPlayerContext projectLPlayerContext = GameManager.Instance.PlayerContext as ProjectLPlayerContext; ConfigDataItemInfo configDataItemInfo = configDataLoader.GetConfigDataItemInfo(goods.Id); this.m_icon.sprite = AssetUtility.Instance.GetSprite(configDataItemInfo.Icon); this.m_iconBg.sprite = AssetUtility.Instance.GetSprite(UIUtility.GetGoodsFrameNameByRank(configDataItemInfo.Rank)); this.m_iconSSREffect.SetActive(UIUtility.IsRankSSR(configDataItemInfo.Rank)); int bagItemCountByType = projectLPlayerContext.GetBagItemCountByType(goods.GoodsType, goods.Id); this.m_haveCount.text = bagItemCountByType.ToString(); this.m_needCount.text = goods.Count.ToString(); if (bagItemCountByType < goods.Count) { this.m_countStateCtrl.SetToUIState("Red", false, true); } else { this.m_countStateCtrl.SetToUIState("White", false, true); } }
// Token: 0x0600F156 RID: 61782 RVA: 0x00402728 File Offset: 0x00400928 private void OnCreateGuildClick() { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_OnCreateGuildClick_hotfix != null) { this.m_OnCreateGuildClick_hotfix.call(new object[] { this }); return; } BJLuaObjHelper.IsSkipLuaHotfix = false; int num = this.m_playerContext.CheckGuildCreateCondition(this.m_guildNameInputField.text, this.m_guildDeclarationInputField.text, this.m_requireLevel); if (num == 0) { string value = this.m_configDataLoader.GetConfigDataStringTable(14002).Value; CommonUIController.Instance.ShowDialogBox(string.Format(value, this.m_guildNameInputField.text), delegate(DialogBoxResult result) { if (result == DialogBoxResult.Ok) { this.CreateGuild(); } }, string.Empty, null); return; } if (num == -501) { ConfigDataItemInfo configDataItemInfo = this.m_configDataLoader.GetConfigDataItemInfo(this.m_configDataLoader.ConfigableConstId_GuildCreateItemId); string value2 = this.m_configDataLoader.GetConfigDataStringTable(14001).Value; CommonUIController.Instance.ShowDialogBox(string.Format(value2, configDataItemInfo.Name), delegate(DialogBoxResult result) { if (result == DialogBoxResult.Ok) { StoreUITask.StartUITask(this.m_guildUITask.CurrentIntent, StoreId.StoreId_Gift, null, false); } }, string.Empty, null); return; } CommonUIController.Instance.ShowErrorMessage(num, 2f, null, true); }
// Token: 0x0600F9FB RID: 63995 RVA: 0x0041C9D8 File Offset: 0x0041ABD8 private List <Goods> GetStoreGoods(int fixedStoreItemId, int selfChooseIndex) { ConfigDataFixedStoreItemInfo configDataFixedStoreItemInfo = this.m_configDataLoader.GetConfigDataFixedStoreItemInfo(fixedStoreItemId); List <Goods> list = new List <Goods>(); if (configDataFixedStoreItemInfo.ItemType == GoodsType.GoodsType_Item) { ConfigDataItemInfo configDataItemInfo = this.m_configDataLoader.GetConfigDataItemInfo(configDataFixedStoreItemInfo.ItemId); if (configDataItemInfo.FuncType == ItemFuncType.ItemFuncType_SelfSelectedBox) { Goods selfChooseGoods = this.GetSelfChooseGoods(fixedStoreItemId, selfChooseIndex); list.Add(selfChooseGoods); return(list); } } list.Add(new Goods { GoodsType = configDataFixedStoreItemInfo.ItemType, Id = configDataFixedStoreItemInfo.ItemId, Count = configDataFixedStoreItemInfo.Nums }); return(list); }
// Token: 0x06013224 RID: 78372 RVA: 0x004E0C84 File Offset: 0x004DEE84 protected override bool IsNeedLoadDynamicRes() { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_IsNeedLoadDynamicRes_hotfix != null) { return(Convert.ToBoolean(this.m_IsNeedLoadDynamicRes_hotfix.call(new object[] { this }))); } BJLuaObjHelper.IsSkipLuaHotfix = false; base.ClearAssetList(); IConfigDataLoader configDataLoader = GameManager.Instance.ConfigDataLoader as IConfigDataLoader; ProjectLPlayerContext projectLPlayerContext = GameManager.Instance.PlayerContext as ProjectLPlayerContext; List <Goods> signRewardMonthList = projectLPlayerContext.GetSignRewardMonthList(this.m_playerContext.GetServerTime().Month); foreach (Goods goods in signRewardMonthList) { base.CollectSpriteAsset(UIUtility.GetGoodsIconName(goods.GoodsType, goods.Id)); if (goods.GoodsType == GoodsType.GoodsType_Item) { ConfigDataItemInfo configDataItemInfo = configDataLoader.GetConfigDataItemInfo(goods.Id); if (configDataItemInfo != null && configDataItemInfo.FuncType == ItemFuncType.ItemFuncType_StaticBox) { ConfigDataStaticBoxInfo configDataStaticBoxInfo = configDataLoader.GetConfigDataStaticBoxInfo(configDataItemInfo.FuncTypeParam1); if (configDataStaticBoxInfo != null) { foreach (Goods goods2 in configDataStaticBoxInfo.Reward) { base.CollectSpriteAsset(UIUtility.GetGoodsIconName(goods2.GoodsType, goods2.Id)); } } } } } return(base.IsNeedLoadDynamicRes()); }
// Token: 0x0600FA0E RID: 64014 RVA: 0x0041CFDC File Offset: 0x0041B1DC protected override void InitAllUIControllers() { base.InitAllUIControllers(); this.m_configDataLoader = (GameManager.Instance.ConfigDataLoader as IConfigDataLoader); this.m_playerContext = (GameManager.Instance.PlayerContext as ProjectLPlayerContext); this.m_itemSelfChooseBuyUIController = (this.m_uiCtrlArray[0] as NormalItemSelfChooseBuyUIController); this.m_itemSelfChooseBuyUIController.Init(this); this.m_normalItemBuyUIController = (this.m_uiCtrlArray[1] as NormalItemBuyUIController); this.m_normalItemBuyUIController.Init(this); UIIntentCustom uiintentCustom = this.m_currIntent as UIIntentCustom; StoreId structParam = uiintentCustom.GetStructParam <StoreId>("storeId"); int structParam2 = uiintentCustom.GetStructParam <int>("fixedStoreItemId"); ConfigDataFixedStoreItemInfo configDataFixedStoreItemInfo = this.m_configDataLoader.GetConfigDataFixedStoreItemInfo(structParam2); if (configDataFixedStoreItemInfo.ItemType == GoodsType.GoodsType_Item) { ConfigDataItemInfo configDataItemInfo = this.m_configDataLoader.GetConfigDataItemInfo(configDataFixedStoreItemInfo.ItemId); if (configDataItemInfo.FuncType == ItemFuncType.ItemFuncType_SelfSelectedBox) { this.m_normalItemBuyUIController.gameObject.SetActive(false); this.m_itemSelfChooseBuyUIController.SetSelfChooseItemBuyPlane(structParam, structParam2); } else { this.m_normalItemBuyUIController.ShowItemBuyPanel(structParam, structParam2); this.m_itemSelfChooseBuyUIController.gameObject.SetActive(false); } } else { this.m_normalItemBuyUIController.ShowItemBuyPanel(structParam, structParam2); this.m_itemSelfChooseBuyUIController.gameObject.SetActive(false); } this.m_normalItemBuyUIController.EventOnBuySuccess += this.OnBuyItemSuccess; this.m_itemSelfChooseBuyUIController.EventOnSelfBoxChoose += this.OnSelfBoxChoose; }
// Token: 0x06004058 RID: 16472 RVA: 0x0012BAEC File Offset: 0x00129CEC public virtual int CanBuyGoods(int storeId, int goodsId, int selectedIndex) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_CanBuyGoodsInt32Int32Int32_hotfix != null) { return(Convert.ToInt32(this.m_CanBuyGoodsInt32Int32Int32_hotfix.call(new object[] { this, storeId, goodsId2, selectedIndex }))); } BJLuaObjHelper.IsSkipLuaHotfix = false; int goodsId = goodsId2; FixedStoreInfo fixedStoreInfo; if (!this.m_configDataLoader.FixedStoreData.Stores.TryGetValue(storeId, out fixedStoreInfo)) { return(-1300); } ConfigDataFixedStoreItemInfo configDataFixedStoreItemInfo; if (!fixedStoreInfo.StoreItems.TryGetValue(goodsId, out configDataFixedStoreItemInfo)) { return(-1301); } if (configDataFixedStoreItemInfo.ItemType == GoodsType.GoodsType_Item) { ConfigDataItemInfo configDataItemInfo = this.m_configDataLoader.GetConfigDataItemInfo(configDataFixedStoreItemInfo.ItemId); if (configDataItemInfo.FuncType == ItemFuncType.ItemFuncType_SelfSelectedBox) { ConfigDataSelfSelectedBoxInfo configDataSelfSelectedBoxInfo = this.m_configDataLoader.GetConfigDataSelfSelectedBoxInfo(configDataItemInfo.FuncTypeParam1); if (configDataSelfSelectedBoxInfo.Reward.Count <= selectedIndex || selectedIndex < 0) { return(-539); } } else if (selectedIndex != -1) { return(-540); } } else { if (configDataFixedStoreItemInfo.ItemType == GoodsType.GoodsType_Gold && this.m_basicInfo.IsGoldOverFlow(configDataFixedStoreItemInfo.Nums)) { return(-422); } if (selectedIndex != -1) { return(-540); } } FixedStoreItem item = null; FixedStore fixedStore = this.m_fixedStoreDS.FindStore(storeId); if (fixedStore != null) { item = fixedStore.Items.Find((FixedStoreItem t) => t.Id == goodsId); } return(this.CanBuyFixedStoreItem(configDataFixedStoreItemInfo, item)); }
// Token: 0x0600D592 RID: 54674 RVA: 0x003A3CD0 File Offset: 0x003A1ED0 private void InitRewardGoodsDescInfo(GoodsType goodsType, int goodsId, bool isNeedAutoClose) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_InitRewardGoodsDescInfoGoodsTypeInt32Boolean_hotfix != null) { this.m_InitRewardGoodsDescInfoGoodsTypeInt32Boolean_hotfix.call(new object[] { this, goodsType, goodsId, isNeedAutoClose }); return; } BJLuaObjHelper.IsSkipLuaHotfix = false; this.m_goodsType = goodsType; this.m_goodsId = goodsId; GameObject gameObject = Utility.FindChildGameObject(base.gameObject, "Item", true); GameObject gameObject2 = Utility.FindChildGameObject(base.gameObject, "Hero", true); Text text = null; GameObject gameObject3 = null; Text text2; Text text3; Image image; GameObject gameObject4; if (this.m_goodsType != GoodsType.GoodsType_Hero) { gameObject.SetActive(true); gameObject2.SetActive(false); text2 = Utility.FindChildComponent <Text>(gameObject, "BG/ItemInfoGroup/NameText", true); text = Utility.FindChildComponent <Text>(gameObject, "BG/ItemInfoGroup/Count/CountText", true); gameObject3 = Utility.FindChildGameObject(gameObject, "BG/ItemInfoGroup/Count", true); text3 = Utility.FindChildComponent <Text>(gameObject, "BG/BGImage/FrameImage/BottomImage2/Desc/Text", true); image = Utility.FindChildComponent <Image>(gameObject, "BG/ItemInfoGroup/IconImage", true); gameObject4 = Utility.FindChildGameObject(gameObject, "BG/BGImage", true); GameObject gameObject5 = Utility.FindChildGameObject(image.gameObject, "U_crystal", true); if (gameObject5 != null) { gameObject5.SetActive(this.m_goodsType == GoodsType.GoodsType_Crystal); } GameObject gameObject6 = Utility.FindChildGameObject(gameObject, "BG/ItemInfoGroup/SSRPieceEffect", true); if (gameObject6 != null) { gameObject6.SetActive(UIUtility.IsGoodsHeroFragment(this.m_goodsType, this.m_goodsId) && UIUtility.IsRankSSR(UIUtility.GetGoodsRank(this.m_goodsType, this.m_goodsId))); } } else { gameObject.SetActive(false); gameObject2.SetActive(true); text2 = Utility.FindChildComponent <Text>(gameObject2, "NameText", true); text3 = Utility.FindChildComponent <Text>(gameObject2, "DescText", true); image = Utility.FindChildComponent <Image>(gameObject2, "IconImage", true); gameObject4 = Utility.FindChildGameObject(gameObject2, "BG/BGImage", true); } if (gameObject4 != null) { PointDescComponent pointDescComponent = base.gameObject.GetComponent <PointDescComponent>(); if (pointDescComponent == null) { pointDescComponent = GameObjectUtility.AddControllerToGameObject <PointDescComponent>(base.gameObject); PointDescComponent pointDescComponent2 = pointDescComponent; GameObject gameObject7 = base.gameObject; GameObject gameObject8 = gameObject4; pointDescComponent2.SetGameObject(gameObject7, isNeedAutoClose, null, gameObject8); pointDescComponent.EventOnClose += delegate() { this.ClosePanel(); }; } else { PointDescComponent pointDescComponent3 = pointDescComponent; GameObject gameObject8 = base.gameObject; GameObject gameObject7 = gameObject4; pointDescComponent3.SetGameObject(gameObject8, isNeedAutoClose, null, gameObject7); } this.m_backgroundTransform = (gameObject4.transform as RectTransform); } if (text2 != null) { text2.text = UIUtility.GetGoodsName(this.m_goodsType, this.m_goodsId); } if (text3 != null) { text3.text = UIUtility.GetGoodsDesc(this.m_goodsType, this.m_goodsId); } if (image != null) { image.gameObject.SetActive(true); image.sprite = AssetUtility.Instance.GetSprite(UIUtility.GetGoodsIconName(this.m_goodsType, this.m_goodsId)); image.material = AssetUtility.Instance.GetAsset <Material>(UIUtility.GetGoodsIconMaterialName(this.m_goodsType, this.m_goodsId)); } if (gameObject3 != null) { bool flag = this.m_goodsType != GoodsType.GoodsType_Crystal && this.m_goodsType != GoodsType.GoodsType_Energy && this.m_goodsType != GoodsType.GoodsType_Gold && this.m_goodsType != GoodsType.GoodsType_PlayerExp && this.m_goodsType != GoodsType.GoodsType_MemoryEssence && this.m_goodsType != GoodsType.GoodsType_ArenaHonour && this.m_goodsType != GoodsType.GoodsType_MithralStone && this.m_goodsType != GoodsType.GoodsType_BrillianceMithralStone && this.m_goodsType != GoodsType.GoodsType_FriendshipPoints; if (this.m_goodsType == GoodsType.GoodsType_Item) { IConfigDataLoader configDataLoader = GameManager.Instance.ConfigDataLoader as IConfigDataLoader; ConfigDataItemInfo configDataItemInfo = configDataLoader.GetConfigDataItemInfo(goodsId); if (configDataItemInfo.FuncType == ItemFuncType.ItemFuncType_RandomBox || configDataItemInfo.FuncType == ItemFuncType.ItemFuncType_StaticBox) { flag = false; } else if (configDataItemInfo.DisplayType == ItemDisplayType.ItemDisplayType_Goblin || configDataItemInfo.DisplayType == ItemDisplayType.ItemDisplayType_UnchartedScore) { flag = false; } } if (flag) { gameObject3.SetActive(true); CommonUIStateController component = gameObject3.GetComponent <CommonUIStateController>(); if (this.m_goodsType == GoodsType.GoodsType_Equipment) { component.SetToUIState("EquipInfo", false, true); this.SetEquipmentPropInfo(this.m_goodsId); } else { component.SetToUIState("Count", false, true); if (text != null) { text.text = UIUtility.GetGoodsCount(this.m_goodsType, this.m_goodsId).ToString(); } } } else { gameObject3.SetActive(false); } } }
// Token: 0x06004764 RID: 18276 RVA: 0x00160280 File Offset: 0x0015E480 public virtual int CanBuyRandomStoreItem(int storeId, int index, int selectedIndex) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_CanBuyRandomStoreItemInt32Int32Int32_hotfix != null) { return(Convert.ToInt32(this.m_CanBuyRandomStoreItemInt32Int32Int32_hotfix.call(new object[] { this, storeId, index, selectedIndex }))); } 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 (this.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); } if (configDataRandomStoreItemInfo.ItemType == GoodsType.GoodsType_Item) { ConfigDataItemInfo configDataItemInfo = this.m_configDataLoader.GetConfigDataItemInfo(configDataRandomStoreItemInfo.ItemID); if (configDataItemInfo.FuncType == ItemFuncType.ItemFuncType_SelfSelectedBox) { ConfigDataSelfSelectedBoxInfo configDataSelfSelectedBoxInfo = this.m_configDataLoader.GetConfigDataSelfSelectedBoxInfo(configDataItemInfo.FuncTypeParam1); if (configDataSelfSelectedBoxInfo.Reward.Count <= selectedIndex || selectedIndex < 0) { return(-539); } } else if (selectedIndex != -1) { return(-540); } } else if (selectedIndex != -1) { return(-540); } if (this.m_bag.IsBagFullByCurrentSize()) { return(-500); } return(0); }
// Token: 0x06012FEC RID: 77804 RVA: 0x004DA0BC File Offset: 0x004D82BC public void InitSelectRewardsInfo(Goods goods, bool isNew, bool isFragment) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_InitSelectRewardsInfoGoodsBooleanBoolean_hotfix != null) { this.m_InitSelectRewardsInfoGoodsBooleanBoolean_hotfix.call(new object[] { this, goods, isNew, isFragment }); return; } BJLuaObjHelper.IsSkipLuaHotfix = false; this.m_text.text = goods.Count.ToString(); this.m_goods = goods; IConfigDataLoader configDataLoader = GameManager.Instance.ConfigDataLoader as IConfigDataLoader; ProjectLPlayerContext projectLPlayerContext = GameManager.Instance.PlayerContext as ProjectLPlayerContext; string name = null; string name2 = null; int num = 0; int rank = 0; this.m_icon.gameObject.transform.localScale = Vector3.one; this.m_fragmentItemID = 0; this.m_stars.gameObject.SetActive(true); switch (goods.GoodsType) { case GoodsType.GoodsType_Hero: { Hero hero = projectLPlayerContext.GetHero(goods.Id); if (hero != null) { ConfigDataHeroInfo heroInfo = hero.HeroInfo; rank = heroInfo.GetRank(hero.StarLevel); num = hero.StarLevel; if (isFragment) { this.m_text.text = heroInfo.ExchangedFragmentCount.ToString(); this.m_fragmentItemID = heroInfo.FragmentItem_ID; name = UIUtility.GetGoodsIconName(GoodsType.GoodsType_Item, heroInfo.FragmentItem_ID); name2 = UIUtility.GetGoodsIconMaterialName(GoodsType.GoodsType_Item, heroInfo.FragmentItem_ID); this.m_stars.gameObject.SetActive(false); } else { ConfigDataCharImageInfo charImageInfo = heroInfo.GetCharImageInfo(heroInfo.Star); if (charImageInfo != null) { name = charImageInfo.SummonHeadImage; name2 = "UI/Icon/Card_ABS/Material/CardIcon.mat"; } } this.m_frame.gameObject.SetActive(false); this.m_icon.gameObject.transform.localScale *= 1.3f; } break; } case GoodsType.GoodsType_JobMaterial: { ConfigDataJobMaterialInfo configDataJobMaterialInfo = configDataLoader.GetConfigDataJobMaterialInfo(goods.Id); name = configDataJobMaterialInfo.Icon; rank = configDataJobMaterialInfo.Rank; num = 0; break; } case GoodsType.GoodsType_Item: { ConfigDataItemInfo configDataItemInfo = configDataLoader.GetConfigDataItemInfo(goods.Id); isFragment = (configDataItemInfo.DisplayType == ItemDisplayType.ItemDisplayType_HeroFragment); name = configDataItemInfo.Icon; rank = configDataItemInfo.Rank; num = 0; break; } case GoodsType.GoodsType_Equipment: { ConfigDataEquipmentInfo configDataEquipmentInfo = configDataLoader.GetConfigDataEquipmentInfo(goods.Id); name = configDataEquipmentInfo.Icon; rank = configDataEquipmentInfo.Rank; num = configDataEquipmentInfo.BornStarLevel; break; } } this.m_icon.sprite = AssetUtility.Instance.GetSprite(name); this.m_icon.material = AssetUtility.Instance.GetAsset <Material>(name2); this.m_frame.sprite = AssetUtility.Instance.GetSprite(UIUtility.GetGoodsFrameNameByRank(rank)); UIUtility.SetGameObjectChildrenActiveCount(this.m_stars, num); this.m_new.SetActive(isNew); this.m_ssrEffect.SetActive(UIUtility.IsRankSSR(rank) && !isFragment); this.m_ssrPieceEffect.SetActive(UIUtility.IsRankSSR(rank) && isFragment); this.m_text.gameObject.SetActive(goods.Count != 1 || isFragment); }
// Token: 0x0600CE09 RID: 52745 RVA: 0x0038B32C File Offset: 0x0038952C public void UpdateViewInGetPathPanel(GoodsType goodsType, int goodsId) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_UpdateViewInGetPathPanelGoodsTypeInt32_hotfix != null) { this.m_UpdateViewInGetPathPanelGoodsTypeInt32_hotfix.call(new object[] { this, goodsType, goodsId }); return; } BJLuaObjHelper.IsSkipLuaHotfix = false; IConfigDataLoader configDataLoader = GameManager.Instance.ConfigDataLoader as IConfigDataLoader; List <GetPathData> getPathList = null; string getPathDesc = string.Empty; switch (goodsType) { case GoodsType.GoodsType_JobMaterial: { ConfigDataJobMaterialInfo configDataJobMaterialInfo = configDataLoader.GetConfigDataJobMaterialInfo(goodsId); if (configDataJobMaterialInfo != null) { getPathList = configDataJobMaterialInfo.GetPathList; getPathDesc = configDataJobMaterialInfo.GetPathDesc; } break; } case GoodsType.GoodsType_Item: { ConfigDataItemInfo configDataItemInfo = configDataLoader.GetConfigDataItemInfo(goodsId); if (configDataItemInfo != null) { getPathList = configDataItemInfo.GetPathList; getPathDesc = configDataItemInfo.GetPathDesc; } break; } case GoodsType.GoodsType_Equipment: { ConfigDataEquipmentInfo configDataEquipmentInfo = configDataLoader.GetConfigDataEquipmentInfo(goodsId); if (configDataEquipmentInfo != null) { getPathList = configDataEquipmentInfo.GetPathList; getPathDesc = configDataEquipmentInfo.GetPathDesc; } break; } case GoodsType.GoodsType_EnchantStone: { ConfigDataEnchantStoneInfo configDataEnchantStoneInfo = configDataLoader.GetConfigDataEnchantStoneInfo(goodsId); if (configDataEnchantStoneInfo != null) { getPathList = configDataEnchantStoneInfo.GetPathList; getPathDesc = configDataEnchantStoneInfo.GetPathDesc; } break; } } this.m_nameText.text = UIUtility.GetGoodsName(goodsType, goodsId); this.m_iconImage.sprite = AssetUtility.Instance.GetSprite(UIUtility.GetGoodsIconName(goodsType, goodsId)); this.m_iconImage.material = AssetUtility.Instance.GetAsset <Material>(UIUtility.GetGoodsIconMaterialName(goodsType, goodsId)); this.m_descText.text = UIUtility.GetGoodsDesc(goodsType, goodsId); this.CreatePathItemList(getPathList, getPathDesc); }
// Token: 0x06004E4A RID: 20042 RVA: 0x0017CA18 File Offset: 0x0017AC18 public BagItemBase CreateBagItem(GoodsType goodsTypeId, int contentId, int nums) { ulong instanceId = BagItemFactory.CreateBagItemInstanceId(goodsTypeId, contentId); if (goodsTypeId == GoodsType.GoodsType_JobMaterial) { return(new JobMaterialBagItem(goodsTypeId, contentId, nums, instanceId)); } if (goodsTypeId != GoodsType.GoodsType_Item) { if (goodsTypeId != GoodsType.GoodsType_EnchantStone) { return(null); } return(new EnchantStoneBagItem(goodsTypeId, contentId, nums, instanceId)); } else { ConfigDataItemInfo configDataItemInfo = this.ConfigDataLoader.GetConfigDataItemInfo(contentId); switch (configDataItemInfo.FuncType) { case ItemFuncType.ItemFuncType_None: case ItemFuncType.ItemFuncType_JobMaterialFragment: return(new UnusableBagItem(goodsTypeId, contentId, nums, instanceId)); case ItemFuncType.ItemFuncType_Gold: return(new GoldUsableBagItem(goodsTypeId, contentId, nums, instanceId) { GoldCount = configDataItemInfo.FuncTypeParam1 }); case ItemFuncType.ItemFuncType_Crystal: return(new CrystalUsableBagItem(goodsTypeId, contentId, nums, instanceId) { CrystalCount = configDataItemInfo.FuncTypeParam1 }); case ItemFuncType.ItemFuncType_Energy: return(new EnergyUsableBagItem(goodsTypeId, contentId, nums, instanceId) { EnergyCount = configDataItemInfo.FuncTypeParam1 }); case ItemFuncType.ItemFuncType_HeroEXP: return(new HeroExpUseableBagItem(goodsTypeId, contentId, nums, instanceId) { HeroExp = configDataItemInfo.FuncTypeParam1 }); case ItemFuncType.ItemFuncType_PlayerEXP: return(new PlayerExpUseableBagItem(goodsTypeId, contentId, nums, instanceId) { PlayerExp = configDataItemInfo.FuncTypeParam1 }); case ItemFuncType.ItemFuncType_HeroFragment: return(new HeroFragmentBagItem(goodsTypeId, contentId, nums, instanceId) { ExchangeMemoryEssence = configDataItemInfo.FuncTypeParam1 }); case ItemFuncType.ItemFuncType_StaticBox: return(new StaticBoxBagItem(goodsTypeId, contentId, nums, instanceId)); case ItemFuncType.ItemFuncType_RandomBox: return(new RandomBoxBagItem(goodsTypeId, contentId, nums, instanceId)); case ItemFuncType.ItemFuncType_NameChange: return(new ChangeNameUsableBagItem(goodsTypeId, contentId, nums, instanceId)); case ItemFuncType.ItemFuncType_AddHeroFavorabilityExp: { AddHeroFavorabilityUseableBagItem addHeroFavorabilityUseableBagItem = new AddHeroFavorabilityUseableBagItem(goodsTypeId, contentId, nums, instanceId); addHeroFavorabilityUseableBagItem.NormalAddExp = configDataItemInfo.FuncTypeParam1; addHeroFavorabilityUseableBagItem.SpecificHeroAddFavorabilityExpMultipleValue = configDataItemInfo.FuncTypeParam2; addHeroFavorabilityUseableBagItem.SpecificHeroes.AddRange(configDataItemInfo.FuncTypeParam4); return(addHeroFavorabilityUseableBagItem); } case ItemFuncType.ItemFuncType_SelfSelectedBox: return(new SelfSelectedBoxBagItem(goodsTypeId, contentId, nums, instanceId)); default: return(null); } } }
// Token: 0x06014CAB RID: 85163 RVA: 0x005462B8 File Offset: 0x005444B8 protected override void UpdateView() { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_UpdateView_hotfix != null) { this.m_UpdateView_hotfix.call(new object[] { this }); return; } BJLuaObjHelper.IsSkipLuaHotfix = false; if (base.IsOpeningUI()) { this.m_buyEnergyUIController.Open(); } ProjectLPlayerContext projectLPlayerContext = GameManager.Instance.PlayerContext as ProjectLPlayerContext; IConfigDataLoader configDataLoader = GameManager.Instance.ConfigDataLoader as IConfigDataLoader; int num = configDataLoader.GetAllConfigDataBuyEnergyInfo().Count <KeyValuePair <int, ConfigDataBuyEnergyInfo> >(); ConfigDataBuyEnergyInfo configDataBuyEnergyInfo; if (projectLPlayerContext.GetBuyEnergyNums() + 1 >= num) { configDataBuyEnergyInfo = configDataLoader.GetConfigDataBuyEnergyInfo(num); } else { configDataBuyEnergyInfo = configDataLoader.GetConfigDataBuyEnergyInfo(projectLPlayerContext.GetBuyEnergyNums() + 1); } if (configDataBuyEnergyInfo != null) { int energyCount = configDataLoader.UtilityGetConfigableConst(ConfigableConstId.ConfigableConstId_BuyEnergyCount); int num2 = projectLPlayerContext.CanBuyEnergy(); this.m_buyEnergyUIController.SetEnergy(energyCount, configDataBuyEnergyInfo.Price, num2 == -414); } else { this.m_buyEnergyUIController.SetEnergy(0, 0, false); } ConfigDataItemInfo configDataItemInfo = null; foreach (KeyValuePair <int, ConfigDataItemInfo> keyValuePair in configDataLoader.GetAllConfigDataItemInfo()) { if (keyValuePair.Value.FuncType == ItemFuncType.ItemFuncType_Energy) { configDataItemInfo = keyValuePair.Value; break; } } if (configDataItemInfo != null) { this.m_getEnergyByUseEnergyMedicine = configDataItemInfo.FuncTypeParam1; int bagItemCountByType = projectLPlayerContext.GetBagItemCountByType(GoodsType.GoodsType_Item, configDataItemInfo.ID); if (bagItemCountByType > 0) { this.m_energyMedicineItemID = configDataItemInfo.ID; this.m_buyEnergyUIController.SetMedicine(this.m_getEnergyByUseEnergyMedicine, 1, bagItemCountByType); } else { this.m_buyEnergyUIController.SetMedicine(this.m_getEnergyByUseEnergyMedicine, 1, 0); } } else { this.m_buyEnergyUIController.SetMedicine(0, 1, 0); } UIIntentCustom uiintentCustom = this.m_currIntent as UIIntentCustom; object obj; if (uiintentCustom != null && uiintentCustom.TryGetParam("NeedShowEnergyNotEnoughTips", out obj) && obj != null && (bool)obj) { string s = (configDataLoader as ClientConfigDataLoader).UtilityGetErrorCodeString(-402); this.m_buyEnergyUIController.ShowEnergyNotEnoughTip(s); uiintentCustom.SetParam("NeedShowEnergyNotEnoughTips", null); } }