protected override bool IsRequiredIconGrayOut(SortCompareData _data)
 {
     if (_data.GetNum() == 0)
     {
         return(true);
     }
     if (_data.IsFavorite())
     {
         return(true);
     }
     if (_data.IsEquipping() && tab == TAB_MODE.EQUIP)
     {
         return(true);
     }
     return(false);
 }
    protected override void ToDetail()
    {
        SaveCurrentScrollPosition();
        int num = (int)GameSection.GetEventData();

        sellItemData.Clear();
        SortCompareData sortCompareData = inventories[(int)tab].datas[num];

        if (!sortCompareData.CanSale())
        {
            if (sortCompareData.IsFavorite())
            {
                GameSection.ChangeEvent("NOT_SELL_FAVORITE", null);
            }
            else if (sortCompareData.IsEquipping())
            {
                GameSection.ChangeEvent("NOT_SELL_EQUIPPING", null);
            }
            else
            {
                GameSection.ChangeEvent("CAN_NOT_SELL", null);
            }
        }
        else if (!MonoBehaviourSingleton <UserInfoManager> .I.CheckTutorialBit(TUTORIAL_MENU_BIT.SKILL_EQUIP) && sortCompareData.GetTableID() == 10000000)
        {
            GameSection.ChangeEvent("NOT_SELL_DEFAULT_WEAPON", null);
        }
        else if (tab == TAB_MODE.MATERIAL)
        {
            GameSection.ChangeEvent("SELECT", sortCompareData);
        }
        else
        {
            sellItemData.Add(inventories[(int)tab].datas[num]);
            GameSection.ChangeEvent("EQUIP_SELECT", null);
            OnQuery_SELL();
        }
    }
Пример #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);
                }
            }
        });
    }
 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);
         }
     });
 }