Пример #1
0
    public static T CreateEquipIconByEquipItemInfo <T>(Object prefab, EquipItemInfo equipItemInfo, int sex, Transform parent, EQUIPMENT_TYPE?magi_enable_icon_type = default(EQUIPMENT_TYPE?), int num = -1, string event_name = null, int event_data = 0, bool is_new = false, int toggle_group = -1, bool is_select = false, string icon_under_text = null, bool is_equipping = false, bool disable_rarity_text = false) where T : ItemIcon
    {
        ITEM_ICON_TYPE icon_type = ITEM_ICON_TYPE.NONE;
        RARITY_TYPE?   rarity    = null;
        ELEMENT_TYPE   element   = ELEMENT_TYPE.MAX;
        int            icon_id   = -1;
        string         empty     = string.Empty;
        GET_TYPE       gET_TYPE  = GET_TYPE.NONE;

        if (equipItemInfo != null && ((ItemInfoBase <EquipItem>)equipItemInfo).tableID != 0 && equipItemInfo.tableData != null)
        {
            EquipItemTable.EquipItemData tableData = equipItemInfo.tableData;
            icon_type = GetItemIconType(tableData.type);
            rarity    = tableData.rarity;
            element   = equipItemInfo.GetTargetElementPriorityToTable();
            icon_id   = tableData.GetIconID(sex);
            gET_TYPE  = tableData.getType;
        }
        GET_TYPE getType = gET_TYPE;

        return(CreateIcon <T>(prefab, icon_type, icon_id, rarity, parent, element, magi_enable_icon_type, num, event_name, event_data, is_new, toggle_group, is_select, icon_under_text, is_equipping, 0, 0, disable_rarity_text, QUEST_ICON_SIZE_TYPE.DEFAULT, getType));
    }
Пример #2
0
 public override ELEMENT_TYPE GetIconElement()
 {
     return(equipData.GetTargetElementPriorityToTable());
 }
Пример #3
0
    public static ItemIcon CreateSmallListItemIcon(ITEM_ICON_TYPE iconType, EquipItemSortData sortData, Transform parent, bool isNew, int no, GET_TYPE getType)
    {
        EquipItemTable.EquipItemData tableData  = sortData.equipData.tableData;
        EquipItemInfo       equipItemInfo       = sortData.GetItemData() as EquipItemInfo;
        ItemIconDetailSmall itemIconDetailSmall = ItemIcon.CreateIcon <ItemIconDetailSmall>(MonoBehaviourSingleton <GlobalSettingsManager> .I.linkResources.itemIconDetailSmallPrefab, iconType, tableData.GetIconID(), tableData.rarity, parent, equipItemInfo.GetTargetElementPriorityToTable(), null, -1, string.Empty, 0, isNew, -1, false, "No." + no.ToString("D4"), false, 0, 0, false, QUEST_ICON_SIZE_TYPE.DEFAULT, getType);

        itemIconDetailSmall.EquipTypeIconInit(tableData);
        itemIconDetailSmall.SetEquipIndexSprite(-1);
        itemIconDetailSmall.EquipTypeIconInit(null);
        itemIconDetailSmall.SetIconStatusSprite(ItemIconDetail.ICON_STATUS.NONE);
        itemIconDetailSmall.SetupSelectNumberSprite(-1);
        itemIconDetailSmall.SetFavoriteIcon(false);
        return(itemIconDetailSmall);
    }
Пример #4
0
    public static ItemIcon CreateEquipAbilityIcon(ITEM_ICON_TYPE icon_type, int icon_id, RARITY_TYPE?rarity, EquipItemSortData item_data, SkillSlotUIData[] skill_slot_data, bool is_show_main_status, Transform parent = null, string event_name = null, int event_data = 0, ICON_STATUS icon_status = ICON_STATUS.NONE, bool is_new = false, int toggle_group = -1, bool is_select = false, int equipping_sp_index = -1, GET_TYPE getType = GET_TYPE.PAY)
    {
        bool           is_equipping   = equipping_sp_index == 0;
        EquipItemInfo  equipItemInfo  = item_data.GetItemData() as EquipItemInfo;
        ItemIconDetail itemIconDetail = ItemIcon.CreateIcon <ItemIconDetail>(MonoBehaviourSingleton <GlobalSettingsManager> .I.linkResources.itemIconDetailPrefab, icon_type, icon_id, rarity, parent, equipItemInfo.GetTargetElementPriorityToTable(), null, -1, event_name, event_data, is_new, toggle_group, false, string.Empty, is_equipping, 0, 0, false, QUEST_ICON_SIZE_TYPE.DEFAULT, getType);

        itemIconDetail.setupperEquipAbility.Set(new object[5]
        {
            item_data.GetItemData() as EquipItemInfo,
            skill_slot_data,
            is_show_main_status,
            icon_status,
            equipping_sp_index
        });
        itemIconDetail.SetFavoriteIcon(item_data.IsFavorite());
        if (Object.op_Implicit(itemIconDetail.setupperEquip.lvRoot))
        {
            UILabel[] componentsInChildren = itemIconDetail.setupperEquipAbility.lvRoot.GetComponentsInChildren <UILabel>();
            itemIconDetail.SetEquipExt(item_data.equipData, componentsInChildren);
        }
        return(itemIconDetail);
    }