public void SendInventorySellAbilityItem(List <string> uids, Action <bool> call_back) { InventoryAbilityItemSellModel.RequestSendForm requestSendForm = new InventoryAbilityItemSellModel.RequestSendForm(); requestSendForm.uids = uids; bool is_attach = false; requestSendForm.uids.ForEach(delegate(string str_uniq_id) { ulong uniq_id = ulong.Parse(str_uniq_id); AbilityItemInfo abilityItem = MonoBehaviourSingleton <InventoryManager> .I.GetAbilityItem(uniq_id); if (abilityItem != null && abilityItem.equipUniqueId != 0L) { is_attach = true; } }); Protocol.Send(InventoryAbilityItemSellModel.URL, requestSendForm, delegate(InventoryAbilityItemSellModel ret) { bool obj = false; if (ret.Error == Error.None) { obj = true; if (is_attach) { MonoBehaviourSingleton <GameSceneManager> .I.SetNotify(GameSection.NOTIFY_FLAG.UPDATE_ABILITY_ITEM_CHANGE); } } call_back(obj); }, string.Empty); }
public void SetList() { if (firstSetList) { firstSetList = false; OnceInventoryModel.Param inventory = MonoBehaviourSingleton <OnceManager> .I.result.inventory; equipItemInventory = EquipItemInfo.CreateList(inventory.equipItem); MonoBehaviourSingleton <GameSceneManager> .I.SetNotify(GameSection.NOTIFY_FLAG.UPDATE_EQUIP_INVENTORY); skillItemInventory = SkillItemInfo.CreateList(inventory.skillItem); MonoBehaviourSingleton <GameSceneManager> .I.SetNotify(GameSection.NOTIFY_FLAG.UPDATE_SKILL_INVENTORY); skillMaterialInventory = SkillItemInfo.CreateListFromItem(inventory.item); abilityItemInventory = AbilityItemInfo.CreateList(inventory.abilityItem); inGameTempItemInventory.Clear(); equipItemFilterList.Clear(); itemInventory = ItemInfo.CreateList(inventory.item); abilityItemInventory = InventoryList <AbilityItemInfo, AbilityItem> .CreateList(inventory.abilityItem); SetExpiredAtList(inventory.expiredItem); MonoBehaviourSingleton <GameSceneManager> .I.SetNotify(GameSection.NOTIFY_FLAG.UPDATE_ITEM_INVENTORY); questItemInventory = QuestItemInfo.CreateList(inventory.questItem); MonoBehaviourSingleton <GameSceneManager> .I.SetNotify(GameSection.NOTIFY_FLAG.UPDATE_QUEST_ITEM_INVENTORY); MonoBehaviourSingleton <QuestManager> .I.needRequestOrderQuestList = true; } }
public void SetParameter(EquipItemInfo equipItemInfo) { this.equipItemInfo = equipItemInfo; abilityItemInfo = equipItemInfo.GetAbilityItem(); EnableAbilityChange = true; if (!base.uiFirstUpdate) { RefreshUI(); } }
private void OnQuery_ABILITY_ITEM_DATA_POPUP() { Transform targetTrans = GameSection.GetEventData() as Transform; AbilityItemInfo abilityItem = GetEquipData().GetAbilityItem(); if (abilityDetailPopUp == null) { abilityDetailPopUp = CreateAndGetAbilityDetail((Enum)UI.OBJ_DETAIL_ROOT); } abilityDetailPopUp.ShowAbilityDetail(targetTrans); abilityDetailPopUp.SetAbilityDetailText(abilityItem.GetName(), string.Empty, abilityItem.GetDescription()); }
protected override void OnQuery_ABILITY_ITEM_DATA() { int num = (int)GameSection.GetEventData(); int index = num - abilityCollection.Length; AbilityItemInfo abilityItemInfo = abilityItems[index]; Transform child = base.GetComponent <UIGrid>((Enum)UI.GRD_ABILITY).GetChild(num); if (abilityDetailPopUp == null) { abilityDetailPopUp = CreateAndGetAbilityDetail((Enum)UI.OBJ_DETAIL_ROOT); } abilityDetailPopUp.ShowAbilityDetail(child); abilityDetailPopUp.SetAbilityDetailText(abilityItemInfo.GetName(), string.Empty, abilityItemInfo.GetDescription()); GameSection.StopEvent(); }
public AbilityItemInfo GetAbilityItem() { List <AbilityItemInfo> all = MonoBehaviourSingleton <InventoryManager> .I.abilityItemInventory.GetAll(); AbilityItemInfo abilityItemInfo = all.Find((AbilityItemInfo x) => x.equipUniqueId == base.uniqueID && x.equipUniqueId != 0); if (abilityItemInfo != null) { return(abilityItemInfo); } if (abilityItem != null && abilityItem.abilityItemId != 0) { AbilityItemInfo abilityItemInfo2 = new AbilityItemInfo(); abilityItemInfo2.SetValue(abilityItem); return(abilityItemInfo2); } return(null); }
public override void Initialize() { currentEventData = (GameSection.GetEventData() as object[]); equipSet = (currentEventData[0] as EquipSetInfo); abilityCollection = (currentEventData[1] as EquipItemAbilityCollection[]); baseStatus = (currentEventData[2] as BaseStatus); EquipItemInfo[] item = equipSet.item; foreach (EquipItemInfo equipItemInfo in item) { if (equipItemInfo != null) { AbilityItemInfo abilityItem = equipItemInfo.GetAbilityItem(); if (abilityItem != null) { abilityItems.Add(abilityItem); } } } Array.Sort(abilityCollection, delegate(EquipItemAbilityCollection l, EquipItemAbilityCollection r) { if (r.ability.ap != l.ability.ap) { return(r.ability.ap - l.ability.ap); } return((int)(l.ability.id - r.ability.id)); }); isEquipSubWeapon = (equipSet.item[1] != null || equipSet.item[2] != null); selectEquipIndex = 0; SetSupportEncoding(UI.LBL_HP, true); SetSupportEncoding(UI.LBL_ATK, true); SetSupportEncoding(UI.LBL_DEF, true); int j = 0; for (int num = uiAtkElem.Length; j < num; j++) { SetSupportEncoding(uiAtkElem[j], true); SetSupportEncoding(uiDefElem[j], true); } InitializeCaption(); base.Initialize(); }
public override void UpdateUI() { SetLabelText((Enum)UI.LBL_NAME, equipItemInfo.tableData.name); SetLabelText((Enum)UI.LBL_LV_NOW, equipItemInfo.level.ToString()); SetLabelText((Enum)UI.LBL_LV_MAX, equipItemInfo.tableData.maxLv.ToString()); SetEquipmentTypeIcon((Enum)UI.SPR_TYPE_ICON, (Enum)UI.SPR_TYPE_ICON_BG, (Enum)UI.SPR_TYPE_ICON_RARITY, equipItemInfo.tableData); Transform ctrl = GetCtrl(UI.OBJ_BEFORE_ITEM_ROOT); Transform ctrl2 = GetCtrl(UI.OBJ_AFTER_ITEM_ROOT); AbilityItemInfo abilityItem = equipItemInfo.GetAbilityItem(); if (abilityItem == null) { SetLabelText(ctrl, UI.LBL_ABILITY_ITEM_NAME, string.Empty); SetLabelText(ctrl, UI.LBL_ABILITY_ITEM_DESC, StringTable.Get(STRING_CATEGORY.TEXT_SCRIPT, 28u)); } else { SetLabelText(ctrl, UI.LBL_ABILITY_ITEM_NAME, abilityItem.GetName()); SetLabelText(ctrl, UI.LBL_ABILITY_ITEM_DESC, abilityItem.GetDescription()); } SetLabelText(ctrl2, UI.LBL_ABILITY_ITEM_NAME, abilityItemInfo.GetName()); SetLabelText(ctrl2, UI.LBL_ABILITY_ITEM_DESC, abilityItemInfo.itemData.GetDescription()); }
public override void UpdateUI() { SetActive((Enum)UI.OBJ_FRAME_BG, IsShowFrameBG()); detailBase = SetPrefab(GetCtrl(UI.OBJ_DETAIL_ROOT), "ItemDetailEquipBase", true); SetFontStyle(detailBase, UI.STR_TITLE_ITEM_INFO, 2); SetFontStyle(detailBase, UI.STR_TITLE_STATUS, 2); SetFontStyle(detailBase, UI.STR_TITLE_SKILL_SLOT, 2); SetFontStyle(detailBase, UI.STR_TITLE_ABILITY, 2); SetFontStyle(detailBase, UI.STR_TITLE_SELL, 2); SetFontStyle(detailBase, UI.STR_TITLE_ATK, 2); SetFontStyle(detailBase, UI.STR_TITLE_ELEM_ATK, 2); SetFontStyle(detailBase, UI.STR_TITLE_DEF, 2); SetFontStyle(detailBase, UI.STR_TITLE_ELEM_DEF, 2); SetFontStyle(detailBase, UI.STR_TITLE_HP, 2); EquipItemInfo equip = detailItemData as EquipItemInfo; SetActive((Enum)UI.BTN_CHANGE, localEquipSetData != null && CanSmithSection(callSection)); SetActive((Enum)UI.BTN_CREATE, CanSmithSection(callSection)); SetActive((Enum)UI.BTN_GROW, CanSmithSection(callSection)); SetActive((Enum)UI.BTN_GROW_OFF, CanSmithSection(callSection)); SetActive((Enum)UI.BTN_ABILITY, CanSmithSection(callSection)); SetActive((Enum)UI.BTN_ABILITY_OFF, CanSmithSection(callSection)); SetActive((Enum)UI.BTN_SELL, IsEnableDispSellButton(callSection) && MonoBehaviourSingleton <ItemExchangeManager> .I.IsExchangeScene()); if (equip != null) { int exceed = equip.exceed; SetActive((Enum)UI.BTN_EXCEED, equip.tableData.exceedID != 0); SetActive((Enum)UI.SPR_COUNT_0_ON, exceed > 0); SetActive((Enum)UI.SPR_COUNT_1_ON, exceed > 1); SetActive((Enum)UI.SPR_COUNT_2_ON, exceed > 2); SetActive((Enum)UI.SPR_COUNT_3_ON, exceed > 3); EquipParam(equip); SetSkillIconButton(detailBase, UI.OBJ_SKILL_BUTTON_ROOT, "SkillIconButton", equip.tableData, equipAttachSkill, "SKILL_ICON_BUTTON", 0); SetSprite((Enum)UI.SPR_SP_ATTACK_TYPE, (!equip.tableData.IsWeapon()) ? string.Empty : equip.tableData.spAttackType.GetBigFrameSpriteName()); AbilityItemInfo abilityItem = equip.GetAbilityItem(); bool flag = abilityItem != null; if ((equip.ability != null && equip.ability.Length > 0) || flag) { bool empty_ability = true; int validAbilityLength = equip.GetValidAbilityLength(); string allAbilityName = string.Empty; string allAp = string.Empty; string allAbilityDesc = string.Empty; SetTable(detailBase, UI.TBL_ABILITY, "ItemDetailEquipAbilityItem", equip.ability.Length + (flag ? 1 : 0), false, delegate(int i, Transform t, bool is_recycle) { //IL_0302: Unknown result type (might be due to invalid IL or missing references) //IL_0312: Expected O, but got Unknown if (i < equip.ability.Length) { EquipItemAbility equipItemAbility2 = equip.ability[i]; if (equipItemAbility2.id == 0) { SetActive(t, false); } else { SetActive(t, true); if (equipItemAbility2.IsNeedUpdate()) { SetActive(t, UI.OBJ_ABILITY, false); SetActive(t, UI.OBJ_FIXEDABILITY, false); SetActive(t, UI.OBJ_NEED_UPDATE_ABILITY, true); SetLabelText(t, UI.LBL_NEED_UPDATE_ABILITY, StringTable.Get(STRING_CATEGORY.ABILITY, 0u)); SetButtonEnabled(t, false); } else if (!equipItemAbility2.IsActiveAbility()) { SetActive(t, UI.OBJ_ABILITY, false); SetActive(t, UI.OBJ_FIXEDABILITY, false); SetActive(t, UI.OBJ_NEED_UPDATE_ABILITY, true); SetLabelText(t, UI.LBL_NEED_UPDATE_ABILITY, StringTable.Get(STRING_CATEGORY.ABILITY, 1u)); SetButtonEnabled(t, false); } else if (equip.IsFixedAbility(i)) { SetActive(t, UI.OBJ_ABILITY, false); SetActive(t, UI.OBJ_FIXEDABILITY, true); SetActive(t, UI.OBJ_NEED_UPDATE_ABILITY, false); SetLabelText(t, UI.LBL_FIXEDABILITY, Utility.TrimText(equipItemAbility2.GetName(), FindCtrl(t, UI.LBL_FIXEDABILITY).GetComponent <UILabel>())); SetLabelText(t, UI.LBL_FIXEDABILITY_NUM, equipItemAbility2.GetAP()); } else { empty_ability = false; SetActive(t, UI.OBJ_NEED_UPDATE_ABILITY, false); SetLabelText(t, UI.LBL_ABILITY, Utility.TrimText(equipItemAbility2.GetName(), FindCtrl(t, UI.LBL_ABILITY).GetComponent <UILabel>())); SetLabelText(t, UI.LBL_ABILITY_NUM, equipItemAbility2.GetAP()); } SetAbilityItemEvent(t, i, touchAndReleaseButtons); allAbilityName += equipItemAbility2.GetName(); allAp += equipItemAbility2.GetAP(); allAbilityDesc += equipItemAbility2.GetDescription(); } } else { SetActive(t, UI.OBJ_ABILITY, false); SetActive(t, UI.OBJ_ABILITY_ITEM, true); SetLabelText(t, UI.LBL_ABILITY_ITEM, abilityItem.GetName()); SetTouchAndRelease(t.GetComponentInChildren <UIButton>().get_transform(), "ABILITY_ITEM_DATA_POPUP", "RELEASE_ABILITY", t); allAbilityName += abilityItem.GetName(); allAbilityDesc += abilityItem.GetDescription(); } }); PreCacheAbilityDetail(allAbilityName, allAp, allAbilityDesc); if (empty_ability) { SetActive(detailBase, UI.STR_NON_ABILITY, 0 == validAbilityLength); SetActive((Enum)UI.BTN_ABILITY, false); SetActive((Enum)UI.BTN_ABILITY_OFF, CanSmithSection(callSection)); } else { SetActive(detailBase, UI.STR_NON_ABILITY, false); SetActive((Enum)UI.BTN_ABILITY_OFF, false); } if (equip.tableData.IsShadow()) { SetActive(detailBase, UI.STR_NON_ABILITY, false); SetActive((Enum)UI.BTN_ABILITY, CanSmithSection(callSection)); SetActive((Enum)UI.BTN_ABILITY_OFF, CanSmithSection(callSection)); } } else { SetActive(detailBase, UI.STR_NON_ABILITY, true); SetActive((Enum)UI.BTN_ABILITY, false); SetActive((Enum)UI.BTN_ABILITY_OFF, CanSmithSection(callSection)); } } else { SetActive((Enum)UI.SPR_COUNT_0_ON, false); SetActive((Enum)UI.SPR_COUNT_1_ON, false); SetActive((Enum)UI.SPR_COUNT_2_ON, false); SetActive((Enum)UI.SPR_COUNT_3_ON, false); EquipItemTable.EquipItemData table = detailItemData as EquipItemTable.EquipItemData; SetActive((Enum)UI.BTN_EXCEED, table.exceedID != 0); EquipTableParam(table); SetSkillIconButton(detailBase, UI.OBJ_SKILL_BUTTON_ROOT, "SkillIconButton", table, equipAttachSkill, "SKILL_ICON_BUTTON", 0); SetSprite((Enum)UI.SPR_SP_ATTACK_TYPE, (!table.IsWeapon()) ? string.Empty : table.spAttackType.GetBigFrameSpriteName()); if (table.fixedAbility.Length > 0) { string allAbilityName2 = string.Empty; string allAp2 = string.Empty; string allAbilityDesc2 = string.Empty; SetTable(detailBase, UI.TBL_ABILITY, "ItemDetailEquipAbilityItem", table.fixedAbility.Length, false, delegate(int i, Transform t, bool is_recycle) { EquipItemAbility equipItemAbility = new EquipItemAbility((uint)table.fixedAbility[i].id, table.fixedAbility[i].pt); SetActive(t, true); SetActive(t, UI.OBJ_ABILITY, false); SetActive(t, UI.OBJ_FIXEDABILITY, true); SetLabelText(t, UI.LBL_FIXEDABILITY, Utility.TrimText(equipItemAbility.GetName(), FindCtrl(t, UI.LBL_FIXEDABILITY).GetComponent <UILabel>())); SetLabelText(t, UI.LBL_FIXEDABILITY_NUM, equipItemAbility.GetAP()); SetAbilityItemEvent(t, i, touchAndReleaseButtons); allAbilityName2 += equipItemAbility.GetName(); allAp2 += equipItemAbility.GetAP(); allAbilityDesc2 += equipItemAbility.GetDescription(); }); PreCacheAbilityDetail(allAbilityName2, allAp2, allAbilityDesc2); SetActive(detailBase, UI.STR_NON_ABILITY, false); } else { SetActive(detailBase, UI.STR_NON_ABILITY, true); } } }
protected override void EquipTableParam() { base.EquipTableParam(); SmithManager.SmithGrowData smithData = MonoBehaviourSingleton <SmithManager> .I.GetSmithData <SmithManager.SmithGrowData>(); EquipItemTable.EquipItemData equipTable = smithData.evolveData.GetEquipTable(); SkillSlotUIData[] evolveInheritanceSkill = GetEvolveInheritanceSkill(GetSkillSlotData(smithData.selectEquipData), equipTable, smithData.selectEquipData.exceed); AbilityItemInfo abilityItem = smithData.selectEquipData.GetAbilityItem(); SetSkillIconButton(UI.OBJ_SKILL_BUTTON_ROOT, "SkillIconButton", equipTable, evolveInheritanceSkill, "SKILL_ICON_BUTTON", 0); adapterAbilityList.Clear(); if (!object.ReferenceEquals(equipTable.fixedAbility, null) && equipTable.fixedAbility.Length > 0) { int j = 0; for (int num = equipTable.fixedAbility.Length; j < num; j++) { AdapterAbility adapterAbility = new AdapterAbility(); adapterAbility.Set(equipTable.fixedAbility[j]); adapterAbilityList.Add(adapterAbility); } } EquipItemInfo selectEquipData = smithData.selectEquipData; if (!object.ReferenceEquals(selectEquipData.ability, null) && selectEquipData.ability.Length > 0) { int k = 0; for (int num2 = selectEquipData.ability.Length; k < num2; k++) { if (!selectEquipData.IsFixedAbility(k)) { AdapterAbility adapterAbility2 = new AdapterAbility(); adapterAbility2.Set(selectEquipData.ability[k]); adapterAbilityList.Add(adapterAbility2); } } } if (adapterAbilityList.Count > 0 || abilityItem != null) { bool empty_ability = true; SetTable(UI.TBL_ABILITY, "ItemDetailEquipAbilityItem", adapterAbilityList.Count + ((abilityItem != null) ? 1 : 0), false, delegate(int i, Transform t, bool is_recycle) { //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Expected O, but got Unknown if (i < adapterAbilityList.Count) { AdapterAbility adapterAbility3 = adapterAbilityList[i]; if (adapterAbility3.GetId() == 0) { SetActive(t, false); } else { empty_ability = false; SetActive(t, true); if (adapterAbility3.isFix) { SetActive(t, UI.OBJ_ABILITY, false); SetActive(t, UI.OBJ_FIXEDABILITY, true); SetLabelText(t, UI.LBL_FIXEDABILITY, adapterAbility3.GetName()); SetLabelText(t, UI.LBL_FIXEDABILITY_NUM, adapterAbility3.GetAP()); } else { SetLabelText(t, UI.LBL_ABILITY, adapterAbility3.GetName()); SetLabelText(t, UI.LBL_ABILITY_NUM, adapterAbility3.GetAP()); } SetAbilityItemEvent(t, i, touchAndReleaseButtons); } } else if (abilityItem != null) { SetActive(t, UI.OBJ_ABILITY, false); SetActive(t, UI.OBJ_ABILITY_ITEM, true); SetLabelText(t, UI.LBL_ABILITY_ITEM, abilityItem.GetName()); SetTouchAndRelease(t.GetComponentInChildren <UIButton>().get_transform(), "ABILITY_ITEM_DATA_POPUP", "RELEASE_ABILITY", t); } }); if (empty_ability) { SetActive((Enum)UI.STR_NON_ABILITY, true); } else { SetActive((Enum)UI.STR_NON_ABILITY, false); } } else { SetActive((Enum)UI.STR_NON_ABILITY, true); } }
protected void UpdateAbilityTable() { int item_num = Mathf.Max(abilityCollection.Length + abilityItems.Count, 5); bool is_scroll = true; string allAbilityName = string.Empty; string allAp = string.Empty; string allAbilityDesc = string.Empty; SetGrid(UI.GRD_ABILITY, "EquipSetDetailAbilityTableItem", item_num, true, delegate(int i, Transform t, bool is_recycle) { //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) if (i >= abilityCollection.Length + abilityItems.Count) { is_scroll = false; SetActive(t, UI.OBJ_ABILITY_ITEM_ROOT, false); } else { SetActive(t, UI.OBJ_ABILITY_ITEM_ROOT, true); if (i < abilityCollection.Length) { SetActive(t, UI.OBJ_ABILITY_ITEM_ITEM_ROOT, false); EquipItemAbilityCollection equipItemAbilityCollection = abilityCollection[i]; if (equipItemAbilityCollection.ability.id == 0 || equipItemAbilityCollection.ability.IsNeedUpdate() || !equipItemAbilityCollection.ability.IsActiveAbility()) { SetActive(t, false); } else { SetActive(t, true); int j = 0; for (int num = equipItemAbilityCollection.equip.Length; j < num; j++) { SetAPLabel(t, uiAbility[j], equipItemAbilityCollection.GetAP(j), equipItemAbilityCollection.swapValue[j]); } SetLabelText(t, UI.LBL_AP_TOTAL, equipItemAbilityCollection.ability.GetAP()); Color color = Color.get_white(); if (equipItemAbilityCollection.GetSwapBalance() < 0) { color = Color.get_red(); } else if (equipItemAbilityCollection.GetSwapBalance() > 0) { color = Color.get_green(); } base.GetComponent <UILabel>(t, (Enum)UI.LBL_AP_TOTAL).color = color; SetLabelText(t, UI.LBL_ABILITY_NAME, equipItemAbilityCollection.ability.GetName()); SetAbilityItemEvent(t, i); allAbilityName += equipItemAbilityCollection.ability.GetName(); allAp += equipItemAbilityCollection.ability.GetAP(); allAbilityDesc += equipItemAbilityCollection.ability.GetDescription(); SetToggle(t, UI.TGL_NAME_TAG, equipItemAbilityCollection.IsAbilityOn()); } } else { int k = 0; for (int num2 = uiAbility.Length; k < num2; k++) { SetAPLabel(t, uiAbility[k], string.Empty, 0); } SetLabelText(t, UI.LBL_AP_TOTAL, string.Empty); int index = i - abilityCollection.Length; AbilityItemInfo abilityItemInfo = abilityItems[index]; SetActive(t, UI.OBJ_ABILITY_ITEM_ITEM_ROOT, true); SetLabelText(t, UI.LBL_ABILITY_NAME, abilityItemInfo.GetName()); SetAbilityItemItemEvent(t, i); allAbilityName += abilityItemInfo.GetName(); allAbilityDesc += abilityItemInfo.GetDescription(); } } }); PreCacheAbilityDetail(allAbilityName, allAp, allAbilityDesc); base.GetComponent <UIScrollView>((Enum)UI.SCR_ABILITY).set_enabled(is_scroll); }
public override void SetItem(object item) { itemData = (AbilityItemInfo)item; }
protected override void ResultEquipInfo() { if (resultData.itemData != null) { EquipItemInfo item = resultData.itemData as EquipItemInfo; EquipItemTable.EquipItemData tableData = item.tableData; bool flag = tableData.IsVisual(); SetActive(detailBase, UI.BTN_SELL, false); SetActive(detailBase, UI.BTN_GROW, false); SetActive(detailBase, UI.BTN_GRAY, false); SetActive(detailBase, UI.OBJ_FAVORITE_ROOT, false); SetActive(detailBase, UI.SPR_IS_EVOLVE, item.tableData.IsEvolve()); SetActive(detailBase, UI.STR_LV, !flag); SetActive(detailBase, UI.STR_ONLY_VISUAL, flag); SetupBottomButton(); SetLabelText(detailBase, UI.LBL_NAME, tableData.name); SetLabelText(detailBase, UI.LBL_LV_MAX, tableData.maxLv.ToString()); SetSprite(detailBase, UI.SPR_SP_ATTACK_TYPE, (!tableData.IsWeapon()) ? string.Empty : tableData.spAttackType.GetBigFrameSpriteName()); if (smithType == SmithType.GROW) { string text = base.sectionData.GetText("STATUS_DIFF_FORMAT"); SetLabelCompareParam(detailBase, UI.LBL_LV_NOW, item.level, resultData.beforeLevel, -1); SetLabelDiffParam(detailBase, UI.LBL_AFTER_ATK, item.atk, UI.LBL_DIFF_ATK, resultData.beforeAtk, UI.LBL_ATK, text); SetLabelDiffParam(detailBase, UI.LBL_AFTER_DEF, item.def, UI.LBL_DIFF_DEF, resultData.beforeDef, UI.LBL_DEF, text); SetLabelDiffParam(detailBase, UI.LBL_AFTER_HP, item.hp, UI.LBL_DIFF_HP, resultData.beforeHp, UI.LBL_HP, text); SetLabelDiffParam(detailBase, UI.LBL_AFTER_ELEM, item.elemAtk, UI.LBL_DIFF_ELEM, resultData.beforeElemAtk, UI.LBL_ELEM, text); SetDiffElementSprite(detailBase, item.GetElemAtkType(), resultData.beforeElemAtk, item.elemAtk, UI.SPR_ELEM, UI.SPR_DIFF_ELEM, true); int num = item.elemDef; int num2 = resultData.beforeElemDef; if (item.tableData.isFormer) { num = Mathf.FloorToInt((float)num * 0.1f); num2 = Mathf.FloorToInt((float)num2 * 0.1f); } SetLabelDiffParam(detailBase, UI.LBL_AFTER_ELEM_DEF, num, UI.LBL_DIFF_ELEM_DEF, num2, UI.LBL_ELEM_DEF, text); SetDiffElementSprite(detailBase, item.GetElemDefType(), resultData.beforeElemDef, item.elemDef, UI.SPR_ELEM_DEF, UI.SPR_DIFF_ELEM_DEF, false); } else { SetLabelText(detailBase, UI.LBL_LV_NOW, item.level.ToString()); SetLabelText(detailBase, UI.LBL_ATK, item.atk.ToString()); SetLabelText(detailBase, UI.LBL_DEF, item.def.ToString()); SetLabelText(detailBase, UI.LBL_HP, item.hp.ToString()); SetLabelText(detailBase, UI.LBL_ELEM, item.elemAtk.ToString()); SetElementSprite(detailBase, UI.SPR_ELEM, item.GetElemAtkType()); int num3 = item.elemDef; if (item.tableData.isFormer) { num3 = Mathf.FloorToInt((float)num3 * 0.1f); } SetLabelText(detailBase, UI.LBL_ELEM_DEF, num3.ToString()); SetDefElementSprite(detailBase, UI.SPR_ELEM_DEF, item.GetElemDefType()); } SetSkillIconButton(detailBase, UI.OBJ_SKILL_BUTTON_ROOT, "SkillIconButton", item.tableData, GetSkillSlotData(item), "SKILL_ICON_BUTTON", 0); SetLabelText(detailBase, UI.LBL_SELL, tableData.sale.ToString()); SetEquipmentTypeIcon(detailBase, UI.SPR_TYPE_ICON, UI.SPR_TYPE_ICON_BG, UI.SPR_TYPE_ICON_RARITY, item.tableData); AbilityItemInfo abilityItem = item.GetAbilityItem(); bool flag2 = abilityItem != null; if ((item.ability != null && item.ability.Length > 0) || flag2) { bool empty_ability = true; string allAbilityName = string.Empty; string allAp = string.Empty; string allAbilityDesc = string.Empty; SetTable(detailBase, UI.TBL_ABILITY, "ItemDetailEquipAbilityItem", item.ability.Length + (flag2 ? 1 : 0), false, delegate(int i, Transform t, bool is_recycle) { //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Expected O, but got Unknown if (i < item.ability.Length) { EquipItemAbility equipItemAbility = item.ability[i]; if (equipItemAbility.id == 0) { SetActive(t, false); } else { empty_ability = false; SetActive(t, true); if (equipItemAbility.IsNeedUpdate()) { SetActive(t, UI.OBJ_ABILITY, false); SetActive(t, UI.OBJ_FIXEDABILITY, false); SetActive(t, UI.OBJ_NEED_UPDATE_ABILITY, true); SetButtonEnabled(t, false); } else if (item.IsFixedAbility(i)) { SetActive(t, UI.OBJ_ABILITY, false); SetActive(t, UI.OBJ_FIXEDABILITY, true); SetLabelText(t, UI.LBL_FIXEDABILITY, equipItemAbility.GetName()); SetLabelText(t, UI.LBL_FIXEDABILITY_NUM, equipItemAbility.GetAP()); } else { SetLabelText(t, UI.LBL_ABILITY, equipItemAbility.GetName()); SetLabelText(t, UI.LBL_ABILITY_NUM, equipItemAbility.GetAP()); } SetAbilityItemEvent(t, i, touchAndReleaseButtons); allAbilityName += equipItemAbility.GetName(); allAp += equipItemAbility.GetAP(); allAbilityDesc += equipItemAbility.GetDescription(); } } else { SetActive(t, UI.OBJ_ABILITY, false); SetActive(t, UI.OBJ_ABILITY_ITEM, true); SetLabelText(t, UI.LBL_ABILITY_ITEM, abilityItem.GetName()); SetTouchAndRelease(t.GetComponentInChildren <UIButton>().get_transform(), "ABILITY_ITEM_DATA_POPUP", "RELEASE_ABILITY", t); allAbilityName += abilityItem.GetName(); allAbilityDesc += abilityItem.GetDescription(); } }); PreCacheAbilityDetail(allAbilityName, allAp, allAbilityDesc); if (empty_ability) { SetActive(detailBase, UI.STR_NON_ABILITY, true); } else { SetActive(detailBase, UI.STR_NON_ABILITY, false); } } else { SetActive(detailBase, UI.STR_NON_ABILITY, true); } } }