private void SetupText() { ConceptCardManager instance = ConceptCardManager.Instance; if (Object.op_Equality((Object)instance, (Object)null) || instance.BulkSelectedMaterialList.Count == 0) { return; } int mixTotalExp; int mixTrustExp; ConceptCardManager.CalcTotalExpTrustMaterialData(out mixTotalExp, out mixTrustExp); if (Object.op_Inequality((Object)this.GetExp, (Object)null)) { this.GetExp.set_text(mixTotalExp.ToString()); } if (Object.op_Inequality((Object)this.GetTrust, (Object)null)) { ConceptCardManager.SubstituteTrustFormat(instance.SelectedConceptCardData, this.GetTrust, mixTrustExp, false); } int totalMixZeny = 0; ConceptCardManager.GalcTotalMixZenyMaterialData(out totalMixZeny); if (!Object.op_Inequality((Object)this.UsedZenny, (Object)null)) { return; } this.UsedZenny.set_text(totalMixZeny.ToString()); }
public void SetTrustText(int trust) { if (Object.op_Equality((Object)this.mTrustText, (Object)null)) { return; } ConceptCardManager.SubstituteTrustFormat(this.mConceptCard, this.mTrustText, trust, false); }
private void SetParam(ConceptCardData card_data, UnitData unit, int job_index) { if (card_data == null || unit == null || unit.Jobs.Length <= job_index) { return; } JobData job = unit.Jobs[job_index]; this.mName.set_text(card_data.Param.name); this.mLvText.set_text(card_data.Lv.ToString()); this.mLvMaxText.set_text(card_data.CurrentLvCap.ToString()); if (Object.op_Inequality((Object)this.mTrustObject, (Object)null)) { this.mTrustObject.SetActive(card_data.GetReward() != null); } ConceptCardManager.SubstituteTrustFormat(card_data, this.mTrustText, (int)card_data.Trust, false); int num1 = 0; float num2 = 1f; if ((int)card_data.Lv < (int)card_data.CurrentLvCap) { int conceptCardLevelExp1 = MonoSingleton <GameManager> .Instance.MasterParam.GetConceptCardLevelExp((int)card_data.Rarity, (int)card_data.Lv); int conceptCardLevelExp2 = MonoSingleton <GameManager> .Instance.MasterParam.GetConceptCardLevelExp((int)card_data.Rarity, (int)card_data.Lv + 1); num2 = (float)((int)card_data.Exp - conceptCardLevelExp1) / (float)(conceptCardLevelExp2 - conceptCardLevelExp1); num1 = conceptCardLevelExp2 - (int)card_data.Exp; } this.mExpText.set_text(num1.ToString()); this.mExpSlider.set_value(num2); if (Object.op_Inequality((Object)this.mIcon, (Object)null)) { this.mIcon.Setup(card_data); } this.mBaseAdd.Clear(); this.mBaseMul.Clear(); this.mUnitAdd.Clear(); this.mUnitMul.Clear(); BaseStatus fixed_status = new BaseStatus(); BaseStatus scale_status = new BaseStatus(); List <ConceptCardEquipEffect> enableEquipEffects = card_data.GetEnableEquipEffects(unit, job); for (int index = 0; index < enableEquipEffects.Count; ++index) { enableEquipEffects[index].GetStatus(ref fixed_status, ref scale_status); this.mBaseAdd.Add(fixed_status); this.mBaseMul.Add(scale_status); } this.mStatus.SetValues(this.mBaseAdd, this.mBaseMul, this.mUnitAdd, this.mUnitMul, false); }
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); }