// Token: 0x0600DF64 RID: 57188 RVA: 0x003C4DC4 File Offset: 0x003C2FC4 public void InitTrainingHeroItem(Hero hero, bool isAchivementUp) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_InitTrainingHeroItemHeroBoolean_hotfix != null) { this.m_InitTrainingHeroItemHeroBoolean_hotfix.call(new object[] { this, hero, isAchivementUp }); return; } BJLuaObjHelper.IsSkipLuaHotfix = false; this.m_hero = hero; this.m_heroLvText.text = hero.Level.ToString(); UIUtility.SetGameObjectChildrenActiveCount(this.m_heroStar, hero.StarLevel); ConfigDataCharImageInfo charImageInfo = hero.HeroInfo.GetCharImageInfo(hero.StarLevel); if (charImageInfo != null) { this.m_heroIconImg.sprite = AssetUtility.Instance.GetSprite(AssetUtility.MakeSpriteAssetName(charImageInfo.CardHeadImage, "_1")); } IConfigDataLoader configDataLoader = GameManager.Instance.ConfigDataLoader as IConfigDataLoader; ConfigDataArmyInfo configDataArmyInfo = configDataLoader.GetConfigDataArmyInfo(hero.GetActiveJob().JobConnectionInfo.m_jobInfo.Army_ID); this.m_heroTypeImg.sprite = AssetUtility.Instance.GetSprite(configDataArmyInfo.Icon); this.m_frameImg.sprite = AssetUtility.Instance.GetSprite(UIUtility.GetHeroItemFrameNameByRank(hero.HeroInfo.GetRank(hero.StarLevel))); this.m_ssrFrameEffect.SetActive(hero.HeroInfo.GetRank(hero.StarLevel) >= 4); this.m_achivementUpImage.SetActive(isAchivementUp); ProjectLPlayerContext projectLPlayerContext = GameManager.Instance.PlayerContext as ProjectLPlayerContext; if (!projectLPlayerContext.IsHeroAssigned(this.m_hero.HeroId)) { this.m_uiStateCtrl.SetToUIState("Normal", false, true); } else { this.m_uiStateCtrl.SetToUIState("Assistant", false, true); } }
// Token: 0x06010AF5 RID: 68341 RVA: 0x00454E98 File Offset: 0x00453098 private void InitValuesInHeroItem(int lvText = 1, int starNum = 1, int curNum = 0, int totalNum = 1, int state = 0) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_InitValuesInHeroItemInt32Int32Int32Int32Int32_hotfix != null) { this.m_InitValuesInHeroItemInt32Int32Int32Int32Int32_hotfix.call(new object[] { this, lvText, starNum, curNum, totalNum, state }); return; } BJLuaObjHelper.IsSkipLuaHotfix = false; if (this.m_hero.HeroInfo != null) { ConfigDataCharImageInfo charImageInfo = this.m_hero.HeroInfo.GetCharImageInfo(this.m_hero.StarLevel); if (charImageInfo != null) { this.m_heroIconImg.sprite = AssetUtility.Instance.GetSprite(AssetUtility.MakeSpriteAssetName(charImageInfo.CardHeadImage, "_1")); } IConfigDataLoader configDataLoader = GameManager.Instance.ConfigDataLoader as IConfigDataLoader; ConfigDataArmyInfo configDataArmyInfo = configDataLoader.GetConfigDataArmyInfo(this.m_hero.GetActiveJob().JobConnectionInfo.m_jobInfo.Army_ID); this.m_heroTypeImg.sprite = AssetUtility.Instance.GetSprite(configDataArmyInfo.Icon); } ProjectLPlayerContext projectLPlayerContext = GameManager.Instance.PlayerContext as ProjectLPlayerContext; if (state != 0) { if (state == 1) { if (curNum >= totalNum) { this.m_uiStateCtrl.SetToUIState("NotGetAndGlowing", false, true); this.m_curHeroItemState = HeroItemUIController.HeroItemState.NotGetAndGlowing; } else { this.m_uiStateCtrl.SetToUIState("NotGet", false, true); this.m_curHeroItemState = HeroItemUIController.HeroItemState.NotGet; } this.m_heroCollectProgressText.text = curNum + "/" + totalNum; this.m_heroCollectProgressImg.fillAmount = (float)curNum / (float)totalNum; this.m_heroIconImg.color = Color.gray; this.m_redMark.gameObject.SetActive(curNum >= totalNum); } } else { this.m_uiStateCtrl.SetToUIState("Get", false, true); this.m_curHeroItemState = HeroItemUIController.HeroItemState.Get; this.m_heroLvText.text = lvText.ToString(); UIUtility.SetGameObjectChildrenActiveCount(this.m_heroStar, starNum); this.m_frameImg.sprite = AssetUtility.Instance.GetSprite(UIUtility.GetHeroItemFrameNameByRank(this.m_hero.HeroInfo.GetRank(this.m_hero.StarLevel))); this.m_ssrFrameEffect.SetActive(this.m_hero.HeroInfo.GetRank(this.m_hero.StarLevel) >= 4); if (projectLPlayerContext.IsHeroShowRedMark(this.m_hero.HeroId, this.m_hero.GetActiveJob().JobConnectionInfo.ID)) { this.m_redMark.gameObject.SetActive(true); } else { this.m_redMark.gameObject.SetActive(false); } } }