public static bool IsRare(SortCompareData icon_base) { if (icon_base != null) { return(GameDefine.IsRare(icon_base.GetRarity())); } return(false); }
public void OnQuery_YES() { if (m_isRareConfirm) { GameSection.SetEventData(new object[1] { item.GetRarity().ToString() }); GameSection.ChangeEvent("INCLUDE_RARE_CONFIRM", null); } else { OnQuery_ItemDetailLithographSellIncludeRareConfirm_YES(); } }
public override void UpdateUI() { ItemInfo itemInfo = data.GetItemData() as ItemInfo; SetActive((Enum)UI.STR_SELL, data.CanSale()); SetActive((Enum)UI.BTN_DETAIL_SELL, data.CanSale() && MonoBehaviourSingleton <ItemExchangeManager> .I.IsExchangeScene()); SetLabelText((Enum)UI.LBL_NAME, data.GetName()); SetLabelText((Enum)UI.LBL_HAVE_NUM, data.GetNum().ToString()); SetLabelText((Enum)UI.LBL_DESCRIPTION, itemInfo.tableData.text); SetLabelText((Enum)UI.LBL_SELL, data.GetSalePrice().ToString()); int num = 0; int num2 = 0; num = itemInfo.tableData.enemyIconID; num2 = itemInfo.tableData.enemyIconID2; GET_TYPE getType = data.GetGetType(); ItemIcon.Create(data.GetIconType(), data.GetIconID(), data.GetRarity(), GetCtrl(UI.OBJ_ICON_ROOT), data.GetIconElement(), data.GetIconMagiEnableType(), -1, null, 0, false, -1, false, null, false, num, num2, false, getType); }
public override void UpdateUI() { SetLabelText((Enum)UI.LBL_ITEM_NAME, item.GetName()); SetLabelText((Enum)UI.LBL_TOTAL, $"{price:N0}"); int enemy_icon_id = 0; int enemy_icon_id2 = 0; if (item is ItemSortData) { ItemTable.ItemData itemData = Singleton <ItemTable> .I.GetItemData(item.GetTableID()); if (itemData != null) { enemy_icon_id = itemData.enemyIconID; enemy_icon_id2 = itemData.enemyIconID2; } } GET_TYPE getType = item.GetGetType(); ItemIcon itemIcon = ItemIcon.Create(item.GetIconType(), item.GetIconID(), item.GetRarity(), GetCtrl(UI.OBJ_ICON_ROOT), item.GetIconElement(), item.GetIconMagiEnableType(), num, null, -1, false, -1, false, null, false, enemy_icon_id, enemy_icon_id2, false, getType); itemIcon.SetRewardBG(true); base.UpdateUI(); }
protected override void UpdateInventoryUI() { int find_index = -1; if (equipSkillItem != null) { find_index = Array.FindIndex(inventory.datas, (SortCompareData data) => data.GetUniqID() == equipSkillItem.uniqueID); if (find_index > -1 && (inventory.datas[find_index] == null || !inventory.datas[find_index].IsPriority(inventory.sortSettings.orderTypeAsc))) { find_index = -1; } } SetupEnableInventoryUI(); SetDynamicList((Enum)inventoryUI, (string)null, inventory.datas.Length + 2, false, (Func <int, bool>) delegate(int i) { if (i == 0) { return(!isVisibleEmptySkill && find_index >= 0); } bool flag = false; bool flag2 = true; int num2 = i - 1; if (find_index >= 0) { if (num2 == 0) { flag = true; } else { num2--; } } if (!flag && (num2 >= inventory.datas.Length || (find_index >= 0 && num2 == find_index))) { flag2 = false; } if (flag2) { SortCompareData sortCompareData2 = inventory.datas[num2]; if (sortCompareData2 == null || !sortCompareData2.IsPriority(inventory.sortSettings.orderTypeAsc)) { flag2 = false; } } return(flag2); }, (Func <int, Transform, Transform>) null, (Action <int, Transform, bool>) delegate(int i, Transform t, bool is_recycle) { if (i == 0) { if (!isVisibleEmptySkill) { CreateRemoveIcon(t, "SELECT", -1, 100, selectIndex == -1, base.sectionData.GetText("STR_DETACH")); } } else { int num = i - 1; if (find_index >= 0) { num = ((num != 0) ? (num - 1) : find_index); } SetActive(t, true); SortCompareData sortCompareData = inventory.datas[num]; SkillItemInfo skillItemInfo = sortCompareData.GetItemData() as SkillItemInfo; ITEM_ICON_TYPE iconType = sortCompareData.GetIconType(); bool is_new = MonoBehaviourSingleton <InventoryManager> .I.IsNewItem(iconType, sortCompareData.GetUniqID()); ItemIcon itemIcon = CreateItemIconDetail(iconType, sortCompareData.GetIconID(), sortCompareData.GetRarity(), sortCompareData as SkillItemSortData, base.IsShowMainStatus, t, "SELECT", num, is_new, 100, selectIndex == num, skillItemInfo.IsCurrentEquipSetAttached, sortCompareData.IsExceeded(), false); itemIcon.SetItemID(sortCompareData.GetTableID()); SetLongTouch(itemIcon.transform, "DETAIL", num); } }); }
protected override void UpdateInventoryUI() { SetupEnableInventoryUI(); bool reset = false; int num = inventory.datas.Length; if (preInventoryDataSize != num) { reset = true; preInventoryDataSize = num; } SetDynamicList((Enum)inventoryUI, (string)null, num, reset, (Func <int, bool>) delegate(int i) { SortCompareData sortCompareData2 = inventory.datas[i]; if (sortCompareData2 == null || !sortCompareData2.IsPriority(inventory.sortSettings.orderTypeAsc)) { return(false); } SkillItemInfo skillItemInfo2 = sortCompareData2.GetItemData() as SkillItemInfo; if (skillItemInfo2 == null) { return(false); } if (!skillItemInfo2.IsLevelMax()) { return(true); } return(skillItemInfo2.IsEnableExceed()); }, (Func <int, Transform, Transform>) null, (Action <int, Transform, bool>) delegate(int i, Transform t, bool is_recycle) { SortCompareData sortCompareData = inventory.datas[i]; if (sortCompareData != null && sortCompareData.IsPriority(inventory.sortSettings.orderTypeAsc)) { SkillItemInfo skillItemInfo = sortCompareData.GetItemData() as SkillItemInfo; if (skillItemInfo != null && (!skillItemInfo.IsLevelMax() || skillItemInfo.IsExistNextExceed())) { ITEM_ICON_TYPE iconType = sortCompareData.GetIconType(); bool is_new = MonoBehaviourSingleton <InventoryManager> .I.IsNewItem(iconType, sortCompareData.GetUniqID()); bool isShowEnableExceed = skillItemInfo.IsEnableExceed() && skillItemInfo.exceedCnt == 0; bool isValidExceed = skillItemInfo.IsEnableExceed(); ItemIcon itemIcon = CreateItemIconDetail(iconType, sortCompareData.GetIconID(), sortCompareData.GetRarity(), sortCompareData as SkillItemSortData, base.IsShowMainStatus, t, "SELECT", i, is_new, 100, selectIndex == i, sortCompareData.IsEquipping(), isValidExceed, isShowEnableExceed); itemIcon.SetItemID(sortCompareData.GetTableID()); itemIcon.SetButtonColor(inventory.datas[i].IsPriority(inventory.sortSettings.orderTypeAsc), true); SetLongTouch(itemIcon.transform, "DETAIL", i); } } }); }
private ItemIcon CreateItemIcon(SortCompareData dropItem, Transform o, string event_name, int i) { ITEM_ICON_TYPE iTEM_ICON_TYPE = ITEM_ICON_TYPE.NONE; RARITY_TYPE? rarity = null; ELEMENT_TYPE element = ELEMENT_TYPE.MAX; EQUIPMENT_TYPE?magi_enable_icon_type = null; int icon_id = -1; int num = -1; if (dropItem != null) { iTEM_ICON_TYPE = dropItem.GetIconType(); icon_id = dropItem.GetIconID(); rarity = dropItem.GetRarity(); element = dropItem.GetIconElement(); magi_enable_icon_type = dropItem.GetIconMagiEnableType(); num = dropItem.GetNum(); if (num == 1) { num = -1; } } bool is_new = false; switch (iTEM_ICON_TYPE) { case ITEM_ICON_TYPE.ITEM: case ITEM_ICON_TYPE.QUEST_ITEM: { ulong uniqID = dropItem.GetUniqID(); if (uniqID != 0L) { is_new = MonoBehaviourSingleton <InventoryManager> .I.IsNewItem(iTEM_ICON_TYPE, dropItem.GetUniqID()); } break; } default: is_new = true; break; case ITEM_ICON_TYPE.NONE: break; } int enemy_icon_id = 0; int enemy_icon_id2 = 0; if (iTEM_ICON_TYPE == ITEM_ICON_TYPE.ITEM) { ItemTable.ItemData itemData = Singleton <ItemTable> .I.GetItemData(dropItem.GetTableID()); enemy_icon_id = itemData.enemyIconID; enemy_icon_id2 = itemData.enemyIconID2; } ItemIcon itemIcon = null; if (dropItem.GetIconType() == ITEM_ICON_TYPE.QUEST_ITEM) { ItemIcon.ItemIconCreateParam itemIconCreateParam = new ItemIcon.ItemIconCreateParam(); itemIconCreateParam.icon_type = dropItem.GetIconType(); itemIconCreateParam.icon_id = dropItem.GetIconID(); itemIconCreateParam.rarity = dropItem.GetRarity(); itemIconCreateParam.parent = o; itemIconCreateParam.element = dropItem.GetIconElement(); itemIconCreateParam.magi_enable_equip_type = dropItem.GetIconMagiEnableType(); itemIconCreateParam.num = dropItem.GetNum(); itemIconCreateParam.enemy_icon_id = enemy_icon_id; itemIconCreateParam.enemy_icon_id2 = enemy_icon_id2; itemIconCreateParam.questIconSizeType = ItemIcon.QUEST_ICON_SIZE_TYPE.REWARD_DELIVERY_LIST; itemIcon = ItemIcon.Create(itemIconCreateParam); } else { GET_TYPE getType = dropItem.GetGetType(); itemIcon = ItemIcon.Create(iTEM_ICON_TYPE, icon_id, rarity, o, element, magi_enable_icon_type, num, event_name, i, is_new, -1, false, null, false, enemy_icon_id, enemy_icon_id2, false, getType); } itemIcon.SetRewardBG(true); itemIcon.SetRewardCategoryInfo(dropItem.GetCategory()); Transform ctrl = GetCtrl(UI.PNL_MATERIAL_INFO); MaterialInfoButton.Set(itemIcon.transform, material_info_t, dropItem.GetMaterialType(), dropItem.GetTableID(), base.sectionData.sectionName, ctrl); return(itemIcon); }
protected virtual void UpdateInventoryUI() { SetupEnableInventoryUI(); SetDynamicList((Enum)inventoryUI, (string)null, inventory.datas.Length, false, (Func <int, bool>) delegate(int i) { SortCompareData sortCompareData2 = inventory.datas[i]; if (sortCompareData2 == null || !sortCompareData2.IsPriority(inventory.sortSettings.orderTypeAsc)) { return(false); } return(true); }, (Func <int, Transform, Transform>) null, (Action <int, Transform, bool>) delegate(int i, Transform t, bool is_recycle) { SortCompareData sortCompareData = inventory.datas[i]; if (sortCompareData != null && sortCompareData.IsPriority(inventory.sortSettings.orderTypeAsc)) { ITEM_ICON_TYPE iconType = sortCompareData.GetIconType(); bool is_new = MonoBehaviourSingleton <InventoryManager> .I.IsNewItem(iconType, sortCompareData.GetUniqID()); ItemIcon itemIcon = CreateItemIconDetail(iconType, sortCompareData.GetIconID(), sortCompareData.GetRarity(), sortCompareData as SkillItemSortData, IsShowMainStatus, t, "SELECT", i, is_new, 100, selectIndex == i, sortCompareData.IsEquipping(), sortCompareData.IsExceeded(), false); itemIcon.SetItemID(sortCompareData.GetTableID()); itemIcon.SetButtonColor(inventory.datas[i].IsPriority(inventory.sortSettings.orderTypeAsc), true); SetLongTouch(itemIcon.transform, "DETAIL", i); } }); }
public override ItemIcon CreateIcon(object[] data) { SortCompareData sortCompareData = data[0] as SortCompareData; Transform parent = data[1] as Transform; int event_data = (int)data[2]; bool is_new = MonoBehaviourSingleton <InventoryManager> .I.IsNewItem(ITEM_ICON_TYPE.ITEM, sortCompareData.GetUniqID()); ItemTable.ItemData itemData = Singleton <ItemTable> .I.GetItemData(sortCompareData.GetTableID()); ItemStorageTop.SHOW_INVENTORY_MODE sHOW_INVENTORY_MODE = (ItemStorageTop.SHOW_INVENTORY_MODE)(int) data[3]; if (sHOW_INVENTORY_MODE != ItemStorageTop.SHOW_INVENTORY_MODE.SMALL) { return(ItemIconDetail.CreateMaterialIcon(sortCompareData.GetIconType(), sortCompareData.GetIconID(), sortCompareData.GetRarity(), itemData, sHOW_INVENTORY_MODE == ItemStorageTop.SHOW_INVENTORY_MODE.MAIN_STATUS, parent, sortCompareData.GetNum(), sortCompareData.GetName(), "SELECT", event_data, -1, false, is_new)); } return(ItemIconDetailSmall.CreateSmallMaterialIcon(sortCompareData.GetIconType(), sortCompareData.GetIconID(), sortCompareData.GetRarity(), parent, sortCompareData.GetNum(), sortCompareData.GetName(), "SELECT", event_data, -1, false, is_new, 0, 0, ItemIconDetail.ICON_STATUS.NONE)); }