// Token: 0x0600BE21 RID: 48673 RVA: 0x003522C0 File Offset: 0x003504C0 public void SetHeroListItemInfo(ARHeroListUIController.HeroWrap heroWrap) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetHeroListItemInfoHeroWrap_hotfix != null) { this.m_SetHeroListItemInfoHeroWrap_hotfix.call(new object[] { this, heroWrap }); return; } BJLuaObjHelper.IsSkipLuaHotfix = false; Hero hero = heroWrap.hero; if (hero.HeroInfo != null) { this.m_heroWrap = heroWrap; ConfigDataCharImageInfo charImageInfo = hero.HeroInfo.GetCharImageInfo(hero.StarLevel); if (charImageInfo != null) { this.m_heroIconImg.sprite = AssetUtility.Instance.GetSprite(AssetUtility.MakeSpriteAssetName(charImageInfo.CardHeadImage, "_1")); } ConfigDataArmyInfo configDataArmyInfo = this.m_configDataLoader.GetConfigDataArmyInfo(hero.GetActiveJob().JobConnectionInfo.m_jobInfo.Army_ID); this.m_heroTypeImg.sprite = AssetUtility.Instance.GetSprite(configDataArmyInfo.Icon); this.m_heroLvText.text = hero.Level.ToString(); this.m_heroFrameImg.sprite = AssetUtility.Instance.GetSprite(UIUtility.GetHeroItemFrameNameByRank(hero.HeroInfo.GetRank(hero.StarLevel))); this.m_heroSSRFrameEffect.SetActive(hero.HeroInfo.GetRank(hero.StarLevel) >= 4); UIUtility.SetGameObjectChildrenActiveCount(this.m_heroStar, hero.StarLevel); base.gameObject.SetActive(true); this.RefreshHeroSelect(); } }
// Token: 0x0600BDC7 RID: 48583 RVA: 0x00351190 File Offset: 0x0034F390 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); if (!this.m_playerContext.IsMe(this.m_playerContext.BusinessCard.UserId)) { return; } this.m_battleTypeButton.onClick.AddListener(new UnityAction(this.OnBattleTypeShowClick)); this.m_heroDrawButton.onClick.AddListener(new UnityAction(this.OnHeroDrawShowClick)); this.m_teamShowButton.onClick.AddListener(new UnityAction(this.OnTeamShowClick)); this.m_bgButton.onClick.AddListener(new UnityAction(this.OnBGButtonClick)); for (int i = 0; i < this.m_heroListInfinityGrid.MinAmount; i++) { GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(this.m_heroListItemPrefab); ARHeroCardUIController arheroCardUIController = GameObjectUtility.AddControllerToGameObject <ARHeroCardUIController>(gameObject); arheroCardUIController.EventOnSelectHeroItem += this.OnHeroItemClick; gameObject.transform.SetParent(this.m_heroListInfinityGrid.transform, false); this.m_arHeroCardUIControllerList.Add(arheroCardUIController); } InfinityGridLayoutGroup heroListInfinityGrid = this.m_heroListInfinityGrid; heroListInfinityGrid.updateChildrenCallback = (InfinityGridLayoutGroup.UpdateChildrenCallbackDelegate)Delegate.Combine(heroListInfinityGrid.updateChildrenCallback, new InfinityGridLayoutGroup.UpdateChildrenCallbackDelegate(this.UpdateInfinityHeroItemCallback)); List <Hero> heros = this.m_playerContext.GetHeros(); heros.Sort((Hero left, Hero right) => right.HeroInfo.Rank - left.HeroInfo.Rank); foreach (Hero hero in heros) { ARHeroListUIController.HeroWrap heroWrap = new ARHeroListUIController.HeroWrap(); heroWrap.hero = hero; this.m_heroWrapList.Add(heroWrap); } if (this.m_heroWrapList.Count > 0) { this.SelectHero(this.m_heroWrapList[0]); } }
// Token: 0x0600BDD1 RID: 48593 RVA: 0x0035191C File Offset: 0x0034FB1C private void UpdateInfinityHeroItemCallback(int index, Transform trans) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_UpdateInfinityHeroItemCallbackInt32Transform_hotfix != null) { this.m_UpdateInfinityHeroItemCallbackInt32Transform_hotfix.call(new object[] { this, index, trans }); return; } BJLuaObjHelper.IsSkipLuaHotfix = false; ARHeroListUIController.HeroWrap heroListItemInfo = this.m_heroWrapList[index]; ARHeroCardUIController component = trans.GetComponent <ARHeroCardUIController>(); component.SetHeroListItemInfo(heroListItemInfo); }
// Token: 0x0600BDC9 RID: 48585 RVA: 0x00351468 File Offset: 0x0034F668 protected void SelectHero(ARHeroListUIController.HeroWrap selectHeroWrap) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SelectHeroHeroWrap_hotfix != null) { this.m_SelectHeroHeroWrap_hotfix.call(new object[] { this, selectHeroWrap }); return; } BJLuaObjHelper.IsSkipLuaHotfix = false; if (this.m_selectHeroWrap != null) { this.m_selectHeroWrap.isSelect = false; } this.m_selectHeroWrap = selectHeroWrap; this.m_selectHeroWrap.isSelect = true; }
// Token: 0x0600BE18 RID: 48664 RVA: 0x003521B0 File Offset: 0x003503B0 public void SelectHero(ARHeroListUIController.HeroWrap selectHeroWrap) { this.m_owner.SelectHero(selectHeroWrap); }