コード例 #1
0
 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);
         }
     });
 }
コード例 #2
0
 protected override void LocalInventory()
 {
     SetupEnableInventoryUI();
     if (localInventoryEquipData != null)
     {
         SetLabelText((Enum)UI.LBL_SORT, sortSettings.GetSortLabel());
         SetDynamicList((Enum)InventoryUI, (string)null, localInventoryEquipData.Length + 1, false, (Func <int, bool>) delegate(int i)
         {
             if (i == 0)
             {
                 return(true);
             }
             int num2 = i - 1;
             SortCompareData sortCompareData = localInventoryEquipData[num2];
             if (sortCompareData == null || !sortCompareData.IsPriority(sortSettings.orderTypeAsc))
             {
                 return(false);
             }
             return(true);
         }, (Func <int, Transform, Transform>) null, (Action <int, Transform, bool>) delegate(int i, Transform t, bool is_recycle)
         {
             if (i == 0)
             {
                 CreateRemoveIcon(t, "SELECT", -1, -1, selectInventoryIndex == -1, base.sectionData.GetText("STR_DETACH"));
             }
             else
             {
                 int num      = i - 1;
                 uint tableID = localInventoryEquipData[num].GetTableID();
                 if (tableID == 0)
                 {
                     SetActive(t, false);
                 }
                 else
                 {
                     SetActive(t, true);
                     EquipItemTable.EquipItemData equipItemData = Singleton <EquipItemTable> .I.GetEquipItemData(tableID);
                     EquipItemSortData equipItemSortData        = localInventoryEquipData[num] as EquipItemSortData;
                     EquipItemInfo equipItemInfo = equipItemSortData.GetItemData() as EquipItemInfo;
                     ITEM_ICON_TYPE iconType     = equipItemSortData.GetIconType();
                     bool is_new = MonoBehaviourSingleton <InventoryManager> .I.IsNewItem(iconType, equipItemSortData.GetUniqID());
                     SkillSlotUIData[] skillSlotData = GetSkillSlotData(equipItemInfo);
                     int equip_index   = (!equipItemSortData.IsEquipping()) ? (-1) : 0;
                     ItemIcon itemIcon = CreateItemIconDetail(equipItemSortData, skillSlotData, base.IsShowMainStatus, t, "SELECT", i - 1, ItemIconDetail.ICON_STATUS.NONE, is_new, -1, false, equip_index);
                     itemIcon.SetItemID(equipItemSortData.GetTableID());
                     itemIcon.SetGrayout(equipItemInfo.level < needLv);
                     object[] event_data = new object[2]
                     {
                         ItemDetailEquip.CURRENT_SECTION.SMITH_EVOLVE,
                         equipItemInfo
                     };
                     SetLongTouch(itemIcon.transform, "DETAIL", event_data);
                 }
             }
         });
     }
 }
コード例 #3
0
    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);
                }
            }
        });
    }
コード例 #4
0
    public override void UpdateUI()
    {
        UpdateAnchors();
        base.UpdateUI();
        SetToggle((Enum)UI.TGL_CHANGE_INVENTORY, showInventoryMode != ItemStorageTop.SHOW_INVENTORY_MODE.SMALL);
        inventory = new InGameUseItemInventory();
        SetDynamicList((Enum)SelectListTarget(showInventoryMode), (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_recycre)
        {
            SortCompareData sortCompareData = inventory.datas[i];
            ItemIcon itemIcon = inventory.CreateIcon(new object[4]
            {
                sortCompareData,
                t,
                i,
                showInventoryMode
            });
            if (itemIcon != null)
            {
                itemIcon.toggleSelectFrame.onChange.Clear();
                itemIcon.toggleSelectFrame.onChange.Add(new EventDelegate(this, "IconToggleChange"));
                SetEvent(itemIcon.transform, "DETAIL", i);
                SetLongTouch(itemIcon.transform, "DETAIL", i);
            }
        });
        UIPanel component = GetCtrl(UI.SCR_INVENTORY).GetComponent <UIPanel>();

        component.Refresh();
        if (isInActiveRotate && MonoBehaviourSingleton <ScreenOrientationManager> .IsValid())
        {
            Reposition(MonoBehaviourSingleton <ScreenOrientationManager> .I.isPortrait);
        }
        isInActiveRotate = false;
    }
コード例 #5
0
 protected override void LocalInventory()
 {
     SetupEnableInventoryUI();
     if (localInventoryEquipData != null)
     {
         SetLabelText((Enum)UI.LBL_SORT, sortSettings.GetSortLabel());
         SetDynamicList((Enum)InventoryUI, (string)null, localInventoryEquipData.Length, false, (Func <int, bool>) delegate(int i)
         {
             SortCompareData sortCompareData = localInventoryEquipData[i];
             if (sortCompareData == null || !sortCompareData.IsPriority(sortSettings.orderTypeAsc))
             {
                 return(false);
             }
             return(true);
         }, (Func <int, Transform, Transform>) null, (Action <int, Transform, bool>) delegate(int i, Transform t, bool is_recycle)
         {
             uint tableID = localInventoryEquipData[i].GetTableID();
             if (tableID == 0)
             {
                 SetActive(t, false);
             }
             else
             {
                 SetActive(t, true);
                 EquipItemTable.EquipItemData equipItemData = Singleton <EquipItemTable> .I.GetEquipItemData(tableID);
                 EquipItemSortData equipItemSortData        = localInventoryEquipData[i] as EquipItemSortData;
                 EquipItemInfo equip             = equipItemSortData.GetItemData() as EquipItemInfo;
                 ITEM_ICON_TYPE iconType         = equipItemSortData.GetIconType();
                 bool is_new                     = MonoBehaviourSingleton <InventoryManager> .I.IsNewItem(iconType, equipItemSortData.GetUniqID());
                 SkillSlotUIData[] skillSlotData = GetSkillSlotData(equip);
                 ItemIcon itemIcon               = CreateItemIconDetail(equipItemSortData, skillSlotData, IsShowMainStatus, t, "TRY_ON", i, equipItemSortData.GetIconStatus(), is_new, -1, false, -1);
                 itemIcon.SetItemID(equipItemSortData.GetTableID());
                 itemIcon.SetButtonColor(localInventoryEquipData[i].IsPriority(sortSettings.orderTypeAsc), true);
                 SetLongTouch(itemIcon.transform, "DETAIL", i);
             }
         });
     }
 }
コード例 #6
0
 protected override void LocalInventory()
 {
     SetupEnableInventoryUI();
     if (localInventoryEquipData != null)
     {
         SetLabelText((Enum)UI.LBL_SORT, sortSettings.GetSortLabel());
         SetDynamicList((Enum)InventoryUI, (string)null, localInventoryEquipData.Length, false, (Func <int, bool>) delegate(int i)
         {
             SortCompareData sortCompareData = localInventoryEquipData[i];
             if (sortCompareData == null || !sortCompareData.IsPriority(sortSettings.orderTypeAsc))
             {
                 return(false);
             }
             return(true);
         }, (Func <int, Transform, Transform>) null, (Action <int, Transform, bool>) delegate(int i, Transform t, bool is_recycle)
         {
             uint tableID = localInventoryEquipData[i].GetTableID();
             if (tableID == 0)
             {
                 SetActive(t, false);
             }
             else
             {
                 SetActive(t, true);
                 EquipItemTable.EquipItemData equipItemData = Singleton <EquipItemTable> .I.GetEquipItemData(tableID);
                 EquipItemSortData equipItemSortData        = localInventoryEquipData[i] as EquipItemSortData;
                 EquipItemInfo equip             = equipItemSortData.GetItemData() as EquipItemInfo;
                 ITEM_ICON_TYPE iconType         = equipItemSortData.GetIconType();
                 bool is_new                     = MonoBehaviourSingleton <InventoryManager> .I.IsNewItem(iconType, equipItemSortData.GetUniqID());
                 SkillSlotUIData[] skillSlotData = GetSkillSlotData(equip);
                 ItemIcon itemIcon               = CreateEquipAbilityIconDetail(getType: equipItemSortData.GetGetType(), icon_type: iconType, icon_id: equipItemData.GetIconID(MonoBehaviourSingleton <UserInfoManager> .I.userStatus.sex), rarity: equipItemData.rarity, item_data: equipItemSortData, skill_slot_data: skillSlotData, is_show_main_status: base.IsShowMainStatus, parent: t, event_name: "TRY_ON", event_data: i, icon_status: equipItemSortData.GetIconStatus(), is_new: is_new, toggle_group: -1, is_select: false, equip_index: -1);
                 itemIcon.SetItemID(equipItemSortData.GetTableID());
                 itemIcon.SetButtonColor(localInventoryEquipData[i].IsPriority(sortSettings.orderTypeAsc), true);
                 SetLongTouch(itemIcon.transform, "DETAIL", i);
             }
         });
     }
 }
コード例 #7
0
    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);
            }
        });
    }
コード例 #8
0
 protected override void LocalInventory()
 {
     SetupEnableInventoryUI();
     SetLabelText((Enum)UI.LBL_SORT, sortSettings.GetSortLabel());
     if (localInventoryEquipData != null)
     {
         SortBase.TYPE tYPE       = TranslateInventoryType(selectTypeIndex);
         bool          _is_pickup = tYPE == SortBase.TYPE.WEAPON_ALL || tYPE == SortBase.TYPE.ARMOR_ALL;
         SetDynamicList((Enum)InventoryUI, string.Empty, localInventoryEquipData.Length, false, (Func <int, bool>) delegate(int check_index)
         {
             SmithCreateItemInfo smithCreateItemInfo = localInventoryEquipData[check_index].GetItemData() as SmithCreateItemInfo;
             if (smithCreateItemInfo == null)
             {
                 return(false);
             }
             if (!MonoBehaviourSingleton <InventoryManager> .I.IsHaveingKeyMaterial(smithCreateItemInfo.smithCreateTableData.needKeyOrder, smithCreateItemInfo.smithCreateTableData.needMaterial))
             {
                 return(false);
             }
             if ((int)smithCreateItemInfo.smithCreateTableData.researchLv > MonoBehaviourSingleton <UserInfoManager> .I.userStatus.researchLv)
             {
                 return(false);
             }
             if (localInventoryEquipData[check_index].GetTableID() == 0)
             {
                 return(false);
             }
             SortCompareData sortCompareData = localInventoryEquipData[check_index];
             if (sortCompareData == null || !sortCompareData.IsPriority(sortSettings.orderTypeAsc))
             {
                 return(false);
             }
             return(true);
         }, (Func <int, Transform, Transform>) null, (Action <int, Transform, bool>) delegate(int i, Transform t, bool is_recycle)
         {
             SmithCreateItemInfo create_info = localInventoryEquipData[i].GetItemData() as SmithCreateItemInfo;
             uint tableID = localInventoryEquipData[i].GetTableID();
             if (tableID == 0)
             {
                 SetActive(t, false);
             }
             else
             {
                 SetActive(t, true);
                 SmithCreateSortData smithCreateSortData = localInventoryEquipData[i] as SmithCreateSortData;
                 if (smithCreateSortData != null && smithCreateSortData.IsPriority(sortSettings.orderTypeAsc))
                 {
                     EquipItemTable.EquipItemData equipItemData = Singleton <EquipItemTable> .I.GetEquipItemData(tableID);
                     ITEM_ICON_TYPE iconType         = localInventoryEquipData[i].GetIconType();
                     SkillSlotUIData[] skillSlotData = GetSkillSlotData(equipItemData, 0);
                     bool flag         = false;
                     flag              = MonoBehaviourSingleton <SmithManager> .I.NeedSmithBadge(create_info, _is_pickup);
                     ItemIcon itemIcon = CreateSmithCreateItemIconDetail(getType: smithCreateSortData.GetGetType(), icon_type: iconType, icon_id: equipItemData.GetIconID(MonoBehaviourSingleton <UserInfoManager> .I.userStatus.sex), rarity: equipItemData.rarity, item_data: smithCreateSortData, skill_slot_data: skillSlotData, is_show_main_status: base.IsShowMainStatus, parent: t, event_name: "SELECT_ITEM", event_data: i, icon_status: smithCreateSortData.GetIconStatus(), is_new: flag, toggle_group: -1, is_select: false);
                     itemIcon.SetItemID(smithCreateSortData.GetTableID());
                     itemIcon.SetButtonColor(localInventoryEquipData[i].IsPriority(sortSettings.orderTypeAsc), true);
                     SetLongTouch(itemIcon.transform, "DETAIL", i);
                 }
             }
         });
     }
 }
コード例 #9
0
    public override void UpdateUI()
    {
        if (inventory == null)
        {
            inventory = new ItemStorageTop.AbilityItemInventory();
        }
        SetActive((Enum)UI.OBJ_BTN_SELL_MODE, !isSellMode);
        SetActive((Enum)UI.OBJ_SELL_MODE_ROOT, isSellMode);
        SetLabelText((Enum)UI.LBL_MAX_HAVE_NUM, MonoBehaviourSingleton <UserInfoManager> .I.userStatus.maxAbilityItem.ToString());
        SetLabelText((Enum)UI.LBL_NOW_HAVE_NUM, inventory.datas.Length.ToString());
        SetActive((Enum)UI.GRD_INVENTORY, false);
        SetActive((Enum)UI.GRD_INVENTORY_SMALL, false);
        SetLabelText((Enum)UI.LBL_SORT, inventory.sortSettings.GetSortLabel());
        SetToggle((Enum)UI.TGL_ICON_ASC, inventory.sortSettings.orderTypeAsc);
        if (isSellMode)
        {
            SetLabelText((Enum)UI.LBL_MAX_SELECT_NUM, MonoBehaviourSingleton <UserInfoManager> .I.userInfo.constDefine.SELL_SELECT_MAX.ToString());
            SetLabelText((Enum)UI.LBL_SELECT_NUM, sellItemData.Count.ToString());
            int num = 0;
            foreach (AbilityItemSortData sellItemDatum in sellItemData)
            {
                num += sellItemDatum.itemData.GetItemTableData().price;
            }
            SetLabelText((Enum)UI.LBL_TOTAL, num.ToString());
        }
        UI currentInventoryRoot = GetCurrentInventoryRoot();

        SetActive((Enum)currentInventoryRoot, true);
        SetDynamicList((Enum)currentInventoryRoot, (string)null, inventory.datas.Length, false, (Func <int, bool>) delegate(int i)
        {
            SortCompareData sortCompareData = inventory.datas[i];
            if (sortCompareData == null || !sortCompareData.IsPriority(inventory.sortSettings.orderTypeAsc))
            {
                return(false);
            }
            return(true);
        }, (Func <int, Transform, Transform>) null, (Action <int, Transform, bool>) delegate(int i, Transform t, bool is_recycre)
        {
            //IL_00e0: Unknown result type (might be due to invalid IL or missing references)
            //IL_00fc: Unknown result type (might be due to invalid IL or missing references)
            SmithUseAbilityItemList smithUseAbilityItemList = this;
            AbilityItemSortData abilityItem = inventory.datas[i] as AbilityItemSortData;
            int num2          = sellItemData.FindIndex((AbilityItemSortData x) => x.GetUniqID() == abilityItem.GetUniqID());
            ItemIcon itemIcon = CreateIcon(abilityItem, t, i);
            if (itemIcon != null)
            {
                itemIcon.SetUniqID(abilityItem.GetUniqID());
                bool flag = abilityItem.itemData.GetItemTableData().rarity <= equipItemInfo.tableData.rarity;
                itemIcon.SetGrayout(!flag);
                if (itemIcon is ItemIconDetail)
                {
                    (itemIcon as ItemIconDetail).setupperMaterial.SetDescription(abilityItem.itemData.GetDescription());
                    (itemIcon as ItemIconDetail).setupperMaterial.SetActiveInfo(1);
                }
                itemIcon.textLabel.get_gameObject().SetActive(true);
                if (isSellMode)
                {
                    itemIcon.selectFrame.get_gameObject().SetActive(num2 >= 0);
                    if (num2 >= 0)
                    {
                        if (itemIcon is ItemIconDetail)
                        {
                            (itemIcon as ItemIconDetail).setupperEquip.SetupSelectNumberSprite(num2 + 1);
                        }
                        else
                        {
                            (itemIcon as ItemIconDetailSmall).SetupSelectNumberSprite(num2 + 1);
                        }
                    }
                }
                SetEvent(itemIcon.transform, (!flag) ? "LESS_RARITY" : "SELECT_ITEM", abilityItem);
            }
        });
        SetToggle((Enum)UI.TGL_CHANGE_INVENTORY, currentShowInventoryMode != SHOW_INVENTORY_MODE.SMALL);
        UpdateAnchors();
        base.UpdateUI();
    }
コード例 #10
0
 protected override void LocalInventory()
 {
     SetupEnableInventoryUI();
     if (localInventoryEquipData != null)
     {
         SetLabelText((Enum)UI.LBL_SORT, sortSettings.GetSortLabel());
         bool          created_remove_btn = false;
         EquipItemInfo equipping_item     = GetCompareItemData();
         int           find_index         = -1;
         if (equipping_item != null)
         {
             find_index = Array.FindIndex(localInventoryEquipData, (SortCompareData data) => data.GetUniqID() == equipping_item.uniqueID);
             if (find_index > -1 && (localInventoryEquipData[find_index] == null || !localInventoryEquipData[find_index].IsPriority(sortSettings.orderTypeAsc)))
             {
                 find_index = -1;
             }
         }
         created_remove_btn = IsCreateRemoveButton();
         SetDynamicList((Enum)InventoryUI, (string)null, localInventoryEquipData.Length + 2, false, (Func <int, bool>) delegate(int i)
         {
             if (created_remove_btn && i == 0)
             {
                 return(true);
             }
             bool flag2 = false;
             bool flag3 = true;
             int num3   = i;
             if (created_remove_btn)
             {
                 num3--;
             }
             if (find_index >= 0)
             {
                 if (num3 == 0)
                 {
                     flag2 = true;
                 }
                 else
                 {
                     num3--;
                 }
             }
             if (!flag2 && (num3 >= localInventoryEquipData.Length || (find_index >= 0 && num3 == find_index)))
             {
                 flag3 = false;
             }
             if (flag3)
             {
                 SortCompareData sortCompareData = localInventoryEquipData[num3];
                 if (sortCompareData == null || !sortCompareData.IsPriority(sortSettings.orderTypeAsc))
                 {
                     flag3 = false;
                 }
             }
             return(flag3);
         }, (Func <int, Transform, Transform>) null, (Action <int, Transform, bool>) delegate(int i, Transform t, bool is_recycle)
         {
             if (i == 0 && created_remove_btn)
             {
                 CreateRemoveIcon(t, "TRY_ON", -1, 100, selectInventoryIndex == -1, base.sectionData.GetText("STR_DETACH"));
             }
             else
             {
                 int num = i;
                 if (created_remove_btn)
                 {
                     num--;
                 }
                 bool flag = false;
                 if (find_index >= 0)
                 {
                     if (num == 0)
                     {
                         num  = find_index;
                         flag = true;
                     }
                     else
                     {
                         num--;
                     }
                 }
                 SetActive(t, true);
                 EquipItemSortData equipItemSortData        = localInventoryEquipData[num] as EquipItemSortData;
                 EquipItemTable.EquipItemData equipItemData = Singleton <EquipItemTable> .I.GetEquipItemData(equipItemSortData.GetTableID());
                 int num2                        = selectEquipSetData.EquippingIndexOf(equipItemSortData.equipData);
                 bool is_select                  = num == selectInventoryIndex;
                 ITEM_ICON_TYPE iconType         = equipItemSortData.GetIconType();
                 SkillSlotUIData[] skillSlotData = GetSkillSlotData(equipItemSortData.GetItemData() as EquipItemInfo);
                 bool is_new                     = MonoBehaviourSingleton <InventoryManager> .I.IsNewItem(iconType, equipItemSortData.GetUniqID());
                 ItemIcon itemIcon;
                 if (IsNotEquip(num2 == -1, flag))
                 {
                     itemIcon = CreateItemIconDetail(equipItemSortData, skillSlotData, base.IsShowMainStatus, t, "TRY_ON", num, ItemIconDetail.ICON_STATUS.NONE, is_new, 100, is_select, -1);
                 }
                 else
                 {
                     int equip_index = -1;
                     if (num2 > -1 || flag)
                     {
                         equip_index = (equipItemData.IsWeapon() ? (num2 + 1) : 0);
                     }
                     if (equipItemSortData != null && equipping_item != null && equipItemSortData.GetUniqID() == equipping_item.uniqueID)
                     {
                         equipItemSortData.SetItem(equipping_item);
                     }
                     itemIcon = CreateItemIconDetail(equipItemSortData, skillSlotData, base.IsShowMainStatus, t, "TRY_ON", num, ItemIconDetail.ICON_STATUS.NONE, is_new, 100, is_select, equip_index);
                 }
                 if (itemIcon != null)
                 {
                     itemIcon.SetItemID(equipItemSortData.GetTableID());
                 }
                 SetLongTouch(itemIcon.transform, "DETAIL", num);
             }
         });
     }
 }