public void SetupWithConceptCard(ConceptCardSkillDatailData conceptCardSkillDatailData, UnitData unitData, ConceptCardDetailAbility.ClickDetail onClickDetail) { bool flag = conceptCardSkillDatailData.effect != null && conceptCardSkillDatailData.effect.Ability != null; if (unitData != null && conceptCardSkillDatailData.type != ConceptCardDetailAbility.ShowType.LockSkill && flag) { List <AbilityData> abilityDataList = new List <AbilityData>(); AbilityData ability = conceptCardSkillDatailData.effect.Ability; using (List <AbilityData> .Enumerator enumerator1 = unitData.SearchDerivedAbilitys(ability).GetEnumerator()) { while (enumerator1.MoveNext()) { using (List <ConceptCardSkillDatailData> .Enumerator enumerator2 = ConceptCardUtility.CreateConceptCardSkillDatailData(enumerator1.Current).GetEnumerator()) { while (enumerator2.MoveNext()) { ConceptCardSkillDatailData current = enumerator2.Current; if (current.type == ConceptCardDetailAbility.ShowType.Ability) { AbilityDeriveList.SetupConceptCard(this.CreateDeriveAbilityItem(current.effect.Ability), current, onClickDetail); } } } } } } if (!this.HasDerive) { this.ShowFlags_IsOn(AbilityDeriveList.ShowFlags.ShowBaseAbility); } if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.m_BaseAbilityRoot, (UnityEngine.Object)null)) { if (flag) { AbilityData ability = conceptCardSkillDatailData.effect.Ability; AbilityDeriveList.SetupConceptCard(this.m_BaseAbilityRoot, conceptCardSkillDatailData, onClickDetail); DataSource.Bind <AbilityData>(this.m_BaseAbilityRoot, ability); } else { SkillData skillData = conceptCardSkillDatailData.skill_data; AbilityDeriveList.SetupConceptCard(this.m_BaseAbilityRoot, conceptCardSkillDatailData, onClickDetail); DataSource.Bind <SkillData>(this.m_BaseAbilityRoot, skillData); } } this.UpdateUIActive(); }
public void RefreshParam(int rarity, int baseExp, int baseTrust, int lvCap, bool enhance) { int lv1; int nextExp1; int expTbl1; ConceptCardUtility.GetExpParameter(rarity, baseExp, (int)this.mConceptCardData.CurrentLvCap, out lv1, out nextExp1, out expTbl1); bool flag1 = enhance && this.mAddExp != 0 && nextExp1 != 0; bool flag2 = enhance && this.mAddTrust != 0 && baseTrust != (int)MonoSingleton <GameManager> .Instance.MasterParam.FixParam.CardTrustMax; bool flag3 = enhance && this.mAddAwakeLv != 0; this.SetText(this.mCardLvText, lv1.ToString()); this.SetText(this.mCardLvCapText, lvCap.ToString()); this.SetText(this.mCardNextExpText, nextExp1.ToString()); ConceptCardManager.SubstituteTrustFormat(this.mConceptCardData, this.mCardTrustText, baseTrust, false); this.mCardLvSlider.set_value((float)(1.0 - (double)nextExp1 / (double)expTbl1)); this.mCardPredictLvArrow.SetActive(false); this.mCardPredictLvSlash.SetActive(false); ((Component)this.mCardPredictLvWhiteText).get_gameObject().SetActive(false); ((Component)this.mCardPredictLvGreenText).get_gameObject().SetActive(false); ((Component)this.mCardPredictLvCapWhiteText).get_gameObject().SetActive(false); ((Component)this.mCardPredictLvCapGreenText).get_gameObject().SetActive(false); this.mCardLvAnimator.Play(this.ANIM_NAME_LV_TEXT_STYLE_DEFAULT); if (flag1 || flag3) { int lv2; int nextExp2; int expTbl2; ConceptCardUtility.GetExpParameter(rarity, baseExp + this.mAddExp, lvCap + this.mAddAwakeLv, out lv2, out nextExp2, out expTbl2); this.SetText(this.mCardNextPredictExpText, nextExp2.ToString()); this.mCardPredictLvSlider.set_value(lv1 >= lv2 ? (float)(1.0 - (double)nextExp2 / (double)expTbl2) : 1f); this.mCardPredictLvArrow.SetActive(true); this.mCardPredictLvSlash.SetActive(true); this.mCardLvAnimator.Play(this.ANIM_NAME_LV_TEXT_STYLE_ENHANCE); if (lv1 < lv2) { ((Component)this.mCardPredictLvGreenText).get_gameObject().SetActive(true); this.SetText(this.mCardPredictLvGreenText, lv2.ToString()); } else { ((Component)this.mCardPredictLvWhiteText).get_gameObject().SetActive(true); this.SetText(this.mCardPredictLvWhiteText, lv2.ToString()); } if (flag3) { ((Component)this.mCardPredictLvCapGreenText).get_gameObject().SetActive(true); this.SetText(this.mCardPredictLvCapGreenText, (lvCap + this.mAddAwakeLv).ToString()); } else { ((Component)this.mCardPredictLvCapWhiteText).get_gameObject().SetActive(true); this.SetText(this.mCardPredictLvCapWhiteText, (lvCap + this.mAddAwakeLv).ToString()); } } if (flag2) { this.SetText(this.mCardPredictTrustText, ConceptCardManager.ParseTrustFormat(baseTrust + this.mAddTrust)); } this.RefreshAwakeIcons(enhance); ((Component)this.mCardNextExpText).get_gameObject().SetActive(!flag1); ((Component)this.mCardNextPredictExpText).get_gameObject().SetActive(flag1); ((Component)this.mCardPredictLvSlider).get_gameObject().SetActive(flag1); ((Component)this.mCardTrustText).get_gameObject().SetActive(!flag2); ((Component)this.mCardPredictTrustText).get_gameObject().SetActive(flag2); }