private void UpdateMaterial() { //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) SetLabelText((Enum)UI.LBL_SELECT_NUM, (10 - materialSkillItem.Count).ToString()); needGold = (int)(skillItem.growCost * (float)materialSkillItem.Count); SetLabelText((Enum)UI.LBL_GOLD, needGold.ToString("N0")); if (MonoBehaviourSingleton <UserInfoManager> .I.userStatus.money < needGold) { SetColor((Enum)UI.LBL_GOLD, Color.get_red()); } else { SetColor((Enum)UI.LBL_GOLD, goldColor); } int exp = 0; SkillItemInfo data = ParamCopy(skillItem, false); int level = data.level; materialSkillItem.ForEach(delegate(SkillItemInfo material) { if (!data.IsLevelMax() && material.level <= material.GetMaxLevel()) { exp += material.giveExp; data.exp += material.giveExp; do { if (data.expNext > data.exp) { return; } data = ParamCopy(data, true); }while (!data.IsLevelMax()); data.exp = data.expPrev; } }); itemData = data; base.UpdateUI(); SetLabelText(detailBase, UI.LBL_LV_NOW, data.level.ToString()); SetLabelText(detailBase, UI.LBL_LV_MAX, data.GetMaxLevel().ToString()); SetActive(detailBase, UI.OBJ_LV_EX, data.IsExceeded()); SetLabelText(detailBase, UI.LBL_LV_EX, data.exceedCnt.ToString()); SetLabelText(detailBase, UI.LBL_ATK, data.atk.ToString()); SetLabelText(detailBase, UI.LBL_DEF, data.def.ToString()); SetLabelText(detailBase, UI.LBL_HP, data.hp.ToString()); SetLabelText(detailBase, UI.LBL_SELL, needGold.ToString()); SetLabelText(detailBase, UI.STR_SELL, base.sectionData.GetText("STR_SELL")); SkillGrowProgress component = FindCtrl(detailBase, UI.PRG_EXP_BAR).GetComponent <SkillGrowProgress>(); float fill_amount = (float)(skillItem.exp - skillItem.expPrev) / (float)(skillItem.expNext - skillItem.expPrev); component.SetGrowMode(); component.SetBaseGauge(data.level == level, fill_amount); UpdateAnchors(); }
private void UpdateLvExp() { //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Expected O, but got Unknown //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Expected O, but got Unknown //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Expected O, but got Unknown SkillItemInfo[] array = materialSkillItem.ToArray(); int num = (array != null) ? array.Length : 0; SetLabelText((Enum)UI.LBL_SELECT_NUM, (MATERIAL_SELECT_MAX - num).ToString()); SkillItemInfo skillItemInfo = ParamCopy(skillItem, false, false); SkillItemInfo skillItemInfo2 = ParamCopy(skillItem, false, false); if (array != null) { int i = 0; for (int num2 = array.Length; i < num2; i++) { if (isExceed) { if (!skillItemInfo2.IsMaxExceed()) { skillItemInfo2.exceedExp += array[i].giveExceedExp; while (skillItemInfo2.exceedExpNext <= skillItemInfo2.exceedExp) { skillItemInfo2 = ParamCopy(skillItemInfo2, false, true); if (skillItemInfo2.IsMaxExceed()) { skillItemInfo2.exceedExp = skillItemInfo2.expPrev; break; } } } } else if (!skillItemInfo2.IsLevelMax() && array[i].level <= array[i].GetMaxLevel()) { skillItemInfo2.exp += array[i].giveExp; while (skillItemInfo2.expNext <= skillItemInfo2.exp) { skillItemInfo2 = ParamCopy(skillItemInfo2, true, false); if (skillItemInfo2.IsLevelMax()) { skillItemInfo2.exp = skillItemInfo2.expPrev; break; } } } } } SetLabelText((Enum)UI.LBL_LV_NOW, skillItemInfo2.level.ToString()); SetLabelText((Enum)UI.LBL_LV_MAX, skillItemInfo2.GetMaxLevel().ToString()); SetActive((Enum)UI.OBJ_LV_EX, skillItemInfo2.IsExceeded()); SetLabelText((Enum)UI.LBL_LV_EX, skillItemInfo2.exceedCnt.ToString()); SkillGrowProgress component = FindCtrl(this.get_transform(), UI.PRG_EXP_BAR).GetComponent <SkillGrowProgress>(); if (isExceed) { float fill_amount = (float)(skillItem.exceedExp - skillItem.exceedExpPrev) / (float)(skillItem.exceedExpNext - skillItem.exceedExpPrev); SetProgressInt(this.get_transform(), UI.PRG_EXP_BAR, skillItemInfo2.exceedExp, skillItemInfo2.exceedExpPrev, skillItemInfo2.exceedExpNext, null); component.SetExceedMode(); component.SetBaseGauge(skillItemInfo2.exceedCnt == skillItemInfo.exceedCnt, fill_amount); } else { float fill_amount2 = (float)(skillItem.exp - skillItem.expPrev) / (float)(skillItem.expNext - skillItem.expPrev); SetProgressInt(this.get_transform(), UI.PRG_EXP_BAR, skillItemInfo2.exp, skillItemInfo2.expPrev, skillItemInfo2.expNext, null); component.SetGrowMode(); component.SetBaseGauge(skillItemInfo2.level == skillItemInfo.level, fill_amount2); } }
private void UpdateMaterial() { //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) int num = (material != null) ? material.Length : 0; SetLabelText((Enum)UI.LBL_SELECT_NUM, (MATERIAL_SELECT_MAX - num).ToString()); needGold = ((!isExceed) ? ((int)(skillItem.growCost * (float)num)) : 0); SetLabelText((Enum)UI.LBL_GOLD, needGold.ToString("N0")); if (MonoBehaviourSingleton <UserInfoManager> .I.userStatus.money < needGold) { SetColor((Enum)UI.LBL_GOLD, Color.get_red()); } else { SetColor((Enum)UI.LBL_GOLD, goldColor); } SetActive((Enum)UI.OBJ_GOLD, !isExceed); SkillItemInfo skillItemInfo = ParamCopy(skillItem, false, false); SkillItemInfo skillItemInfo2 = ParamCopy(skillItem, false, false); if (material != null) { int i = 0; for (int num2 = material.Length; i < num2; i++) { if (isExceed) { if (!skillItemInfo2.IsMaxExceed()) { skillItemInfo2.exceedExp += material[i].giveExceedExp; while (skillItemInfo2.exceedExpNext <= skillItemInfo2.exceedExp) { skillItemInfo2 = ParamCopy(skillItemInfo2, false, true); if (skillItemInfo2.IsMaxExceed()) { skillItemInfo2.exceedExp = skillItemInfo2.expPrev; break; } } } } else if (!skillItemInfo2.IsLevelMax() && material[i].level <= material[i].GetMaxLevel()) { skillItemInfo2.exp += material[i].giveExp; while (skillItemInfo2.expNext <= skillItemInfo2.exp) { skillItemInfo2 = ParamCopy(skillItemInfo2, true, false); if (skillItemInfo2.IsLevelMax()) { skillItemInfo2.exp = skillItemInfo2.expPrev; break; } } } } } bool flag = false; flag = ((!isExceed) ? (skillItemInfo.level != skillItemInfo2.level) : (skillItemInfo.exceedCnt != skillItemInfo2.exceedCnt)); SetActive(detailBase, UI.LBL_DESCRIPTION, !flag); SetActive((Enum)UI.LBL_BASE_DESCRIPTION, flag); SetActive((Enum)UI.LBL_NEXT_DESCRIPTION, flag); SetActive((Enum)UI.SPR_STATUS_UP, flag); itemData = skillItemInfo2; base.UpdateUI(); SetLabelText(detailBase, UI.LBL_LV_NOW, skillItemInfo2.level.ToString()); SetLabelText(detailBase, UI.LBL_LV_MAX, skillItemInfo2.GetMaxLevel().ToString()); SetActive(detailBase, UI.OBJ_LV_EX, skillItemInfo2.IsExceeded()); SetLabelText(detailBase, UI.LBL_LV_EX, skillItemInfo2.exceedCnt.ToString()); SetLabelText(detailBase, UI.LBL_ATK, skillItemInfo2.atk.ToString()); SetLabelText(detailBase, UI.LBL_DEF, skillItemInfo2.def.ToString()); SetLabelText(detailBase, UI.LBL_HP, skillItemInfo2.hp.ToString()); SetLabelText(detailBase, UI.LBL_SELL, needGold.ToString()); SetLabelText(detailBase, UI.STR_SELL, base.sectionData.GetText("STR_SELL")); SetSupportEncoding(UI.LBL_DESCRIPTION, true); SetSupportEncoding(UI.LBL_BASE_DESCRIPTION, true); SetSupportEncoding(UI.LBL_NEXT_DESCRIPTION, true); string explanationText = skillItemInfo.GetExplanationText(true); SetLabelText(detailBase, UI.LBL_DESCRIPTION, explanationText); SetLabelText((Enum)UI.LBL_BASE_DESCRIPTION, explanationText); SetLabelText((Enum)UI.LBL_NEXT_DESCRIPTION, skillItemInfo2.GetExplanationStatusUpText(base.sectionData.GetText("STR_STATUS_UP_FORMAT"), isExceed, skillItemInfo.exceedCnt > 0)); SkillGrowProgress component = FindCtrl(detailBase, UI.PRG_EXP_BAR).GetComponent <SkillGrowProgress>(); if (isExceed) { component.SetExceedMode(); float fill_amount = (float)(skillItem.exceedExp - skillItem.exceedExpPrev) / (float)(skillItem.exceedExpNext - skillItem.exceedExpPrev); component.SetBaseGauge(skillItemInfo2.exceedCnt == skillItemInfo.exceedCnt, fill_amount); SetProgressInt(detailBase, UI.PRG_EXP_BAR, skillItemInfo2.exceedExp, skillItemInfo2.exceedExpPrev, skillItemInfo2.exceedExpNext, null); } else { float fill_amount2 = (float)(skillItem.exp - skillItem.expPrev) / (float)(skillItem.expNext - skillItem.expPrev); component.SetGrowMode(); component.SetBaseGauge(skillItemInfo2.level == skillItemInfo.level, fill_amount2); SetProgressInt(detailBase, UI.PRG_EXP_BAR, skillItemInfo2.exp, skillItemInfo2.expPrev, skillItemInfo2.expNext, null); } UpdateAnchors(); }