public override void OnNotify(NOTIFY_FLAG flags) { if ((flags & (NOTIFY_FLAG.UPDATE_SKILL_FAVORITE | NOTIFY_FLAG.UPDATE_ITEM_INVENTORY | NOTIFY_FLAG.UPDATE_SKILL_INVENTORY)) != (NOTIFY_FLAG)0L) { inventory = new ItemStorageTop.SkillItemInventory((!isExceed) ? SortSettings.SETTINGS_TYPE.GROW_SKILL_ITEM : SortSettings.SETTINGS_TYPE.EXCEED_SKILL_ITEM, SKILL_SLOT_TYPE.NONE, true); sorting(); skillItem = MonoBehaviourSingleton <InventoryManager> .I.skillItemInventory.Find(skillItem.uniqueID); List <SkillItemInfo> del_list = new List <SkillItemInfo>(); materialSkillItem.ForEach(delegate(SkillItemInfo skill) { SkillItemInfo skillItemInfo = MonoBehaviourSingleton <InventoryManager> .I.skillItemInventory.Find(skill.uniqueID); SkillItemInfo skillItemInfo2 = MonoBehaviourSingleton <InventoryManager> .I.skillMaterialInventory.Find(skill.uniqueID); if ((skillItemInfo == null && skillItemInfo2 == null) || (skillItemInfo != null && skillItemInfo.isFavorite)) { del_list.Add(skill); } }); del_list.ForEach(delegate(SkillItemInfo delitem) { materialSkillItem.Remove(delitem); }); inventory = null; RefreshUI(); } base.OnNotify(flags); }
private void InitInventory() { inventory = new ItemStorageTop.SkillItemInventory((!isExceed) ? SortSettings.SETTINGS_TYPE.GROW_SKILL_ITEM : SortSettings.SETTINGS_TYPE.EXCEED_SKILL_ITEM, SKILL_SLOT_TYPE.NONE, true); if (isSortTypeReset) { inventory.sortSettings.ResetType(true); } sorting(); }
public override void UpdateUI() { SetFontStyle((Enum)UI.STR_TITLE_ITEM_INFO, 2); SetFontStyle((Enum)UI.STR_TITLE_DESCRIPTION, 2); SetFontStyle((Enum)UI.STR_TITLE_STATUS, 2); SetFontStyle((Enum)UI.STR_TITLE_SELL, 2); SetActive((Enum)UI.BTN_DECISION, true); SetActive((Enum)UI.BTN_SKILL_DECISION, false); SetLabelText((Enum)UI.STR_DECISION_R, base.sectionData.GetText("STR_DECISION")); if (inventory == null || updateInventory) { selectIndex = GetInventoryFirstIndex(); inventory = CreateInventory(); if (inventory.datas.Length > 0) { if (selectSkillItem == null) { if (equipSkillItem != null) { selectIndex = GetSelectItemIndex(equipSkillItem); } if (selectIndex >= 0) { selectSkillItem = (inventory.datas[selectIndex].GetItemData() as SkillItemInfo); } else { selectSkillItem = null; } } else { selectIndex = GetSelectItemIndex(selectSkillItem); } } updateInventory = false; } SetInventoryIsEmptyParam(); SetLabelText((Enum)UI.LBL_SORT, inventory.sortSettings.GetSortLabel()); SetToggle((Enum)UI.TGL_ICON_ASC, inventory.sortSettings.orderTypeAsc); UpdateInventoryUI(); UpdateParam(); }
public override void OnNotify(NOTIFY_FLAG flags) { if ((flags & (NOTIFY_FLAG.UPDATE_SKILL_FAVORITE | NOTIFY_FLAG.UPDATE_SKILL_INVENTORY)) != (NOTIFY_FLAG)0L) { skillItem = MonoBehaviourSingleton <InventoryManager> .I.skillItemInventory.Find(skillItem.uniqueID); List <SkillItemInfo> del_list = new List <SkillItemInfo>(); materialSkillItem.ForEach(delegate(SkillItemInfo skill) { SkillItemInfo skillItemInfo = MonoBehaviourSingleton <InventoryManager> .I.skillItemInventory.Find(skill.uniqueID); if (skillItemInfo == null || skillItemInfo.isFavorite) { del_list.Add(skill); } }); del_list.ForEach(delegate(SkillItemInfo delitem) { materialSkillItem.Remove(delitem); }); inventory = null; SetDirty(inventoryUI); } base.OnNotify(flags); }
private void InitInventory() { inventory = new ItemStorageTop.SkillItemInventory(SortSettings.SETTINGS_TYPE.GROW_SKILL_ITEM, SKILL_SLOT_TYPE.NONE, false); inventory.sortSettings = SortSettings.CreateMemSortSettings(SortBase.DIALOG_TYPE.STORAGE_SKILL, SortSettings.SETTINGS_TYPE.GROW_SKILL_ITEM); sorting(); }