private void RefreshView() { List <AbilityParam> artifact_all_abilities = new List <AbilityParam>(); if (this.mCurrentArtifactParam != null && this.mCurrentArtifactParam.abil_inames != null) { for (int index = 0; index < this.mCurrentArtifactParam.abil_inames.Length; ++index) { if (!string.IsNullOrEmpty(this.mCurrentArtifactParam.abil_inames[index])) { AbilityParam abilityParam = MonoSingleton <GameManager> .Instance.MasterParam.GetAbilityParam(this.mCurrentArtifactParam.abil_inames[index]); if (abilityParam != null) { artifact_all_abilities.Add(abilityParam); } } } } List <AbilityData> weapon_abilities = (List <AbilityData>)null; if (this.IsNeedCheck) { weapon_abilities = this.mCurrentArtifactData.LearningAbilities; } List <AbilityDeriveParam> derive_params = (List <AbilityDeriveParam>)null; if (this.IsNeedCheck) { SkillAbilityDeriveData abilityDeriveData = this.mCurrentUnit.GetSkillAbilityDeriveData(this.mCurrentJob, this.mCurrentEquipSlot, this.mCurrentArtifactParam); if (abilityDeriveData != null) { derive_params = abilityDeriveData.GetAvailableAbilityDeriveParams(); } } this.mViewAbilities = this.CreateViewData(artifact_all_abilities, weapon_abilities, derive_params); this.mAbilityEmptyTextObject.SetActive(this.mViewAbilities.Count <= 0); this.CreateInstance(this.mViewAbilities); bool flag = false; foreach (ArtifactDetailAbilityItem componentsInChild in (ArtifactDetailAbilityItem[])((Component)this).GetComponentsInChildren <ArtifactDetailAbilityItem>(true)) { if (componentsInChild.HasDeriveAbility) { flag = true; break; } } ((Selectable)this.mHideDisplayAbilityToggle).set_interactable(flag); if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.mSetEffectsButton, (UnityEngine.Object)null) && this.mCurrentArtifactParam != null) { ((Selectable)this.mSetEffectsButton).set_interactable(MonoSingleton <GameManager> .Instance.MasterParam.ExistSkillAbilityDeriveDataWithArtifact(this.mCurrentArtifactParam.iname)); } this.Reposition(); }
public void Setup(SkillAbilityDeriveData skillAbilityDeriveData) { List <SkillDeriveParam> skillDeriveParams = skillAbilityDeriveData.GetAvailableSkillDeriveParams(); List <AbilityDeriveParam> abilityDeriveParams = skillAbilityDeriveData.GetAvailableAbilityDeriveParams(); this.m_ViewContentSkillParams = SkillAbilityDeriveListItem.CreateViewContentSkillParams(skillDeriveParams); this.m_ViewContentAbilityParams = SkillAbilityDeriveListItem.CreateViewContentAbilityParams(abilityDeriveParams); using (List <SkillAbilityDeriveListItem.ViewContentSkillParam> .Enumerator enumerator = this.m_ViewContentSkillParams.GetEnumerator()) { while (enumerator.MoveNext()) { this.CreateListItem(enumerator.Current); } } using (List <SkillAbilityDeriveListItem.ViewContentAbilityParam> .Enumerator enumerator = this.m_ViewContentAbilityParams.GetEnumerator()) { while (enumerator.MoveNext()) { this.CreateListItem(enumerator.Current); } } this.UpdateUIActive(); }