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 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);
         }
     });
 }