Ejemplo n.º 1
0
    public static ItemIconEquipMaterial CreateEquipMaterialIcon(ITEM_ICON_TYPE icon_type, EquipItemTable.EquipItemData equip_table, Transform parent = null, int have_num = -1, int need_num = -1, string event_name = null, int event_data = 0, bool is_new = false, GET_TYPE getType = GET_TYPE.PAY)
    {
        ItemIconEquipMaterial itemIconEquipMaterial = ItemIcon.CreateIcon <ItemIconEquipMaterial>(MonoBehaviourSingleton <GlobalSettingsManager> .I.linkResources.itemIconEquipMaterialPrefab, icon_type, equip_table.GetIconID(), equip_table.rarity, parent, ELEMENT_TYPE.MAX, null, -1, event_name, event_data, is_new, -1, false, null, false, 0, 0, false, QUEST_ICON_SIZE_TYPE.DEFAULT, getType);

        itemIconEquipMaterial.EquipTypeIconInit(equip_table);
        itemIconEquipMaterial.SetMaterialNum(have_num);
        itemIconEquipMaterial.SetVisibleBG(true);
        itemIconEquipMaterial.SelectUniqueID(0uL);
        return(itemIconEquipMaterial);
    }
Ejemplo n.º 2
0
    protected override void NeededMaterial()
    {
        //IL_0024: Unknown result type (might be due to invalid IL or missing references)
        //IL_0029: Expected O, but got Unknown
        //IL_0032: Unknown result type (might be due to invalid IL or missing references)
        //IL_003e: Unknown result type (might be due to invalid IL or missing references)
        //IL_00db: Unknown result type (might be due to invalid IL or missing references)
        //IL_00e0: Unknown result type (might be due to invalid IL or missing references)
        //IL_00f7: 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)
        //IL_011c: Unknown result type (might be due to invalid IL or missing references)
        //IL_0121: Unknown result type (might be due to invalid IL or missing references)
        //IL_012a: Unknown result type (might be due to invalid IL or missing references)
        Transform ctrl = GetCtrl(UI.GRD_NEED_MATERIAL);

        while (ctrl.get_childCount() != 0)
        {
            Transform val = ctrl.GetChild(0);
            val.set_parent(null);
            val.get_gameObject().SetActive(false);
            Object.Destroy(val.get_gameObject());
        }
        int needEquipSize = 0;
        int num           = 0;

        if (needEquip != null)
        {
            needEquipSize = needEquip.Length;
        }
        if (needMaterial != null)
        {
            num = needMaterial.Length;
        }
        int needItemSize = needEquipSize + num;

        SetGrid(UI.GRD_NEED_MATERIAL, null, needItemSize, true, delegate(int i, Transform t, bool is_recycle)
        {
            if (i < needEquipSize && needEquip != null)
            {
                EquipItemTable.EquipItemData equipItemData = Singleton <EquipItemTable> .I.GetEquipItemData(needEquip[i].equipItemID);
                if (equipItemData != null)
                {
                    GET_TYPE getType = equipItemData.getType;
                    ItemIconEquipMaterial itemIconEquipMaterial = ItemIconEquipMaterial.CreateEquipMaterialIcon(ItemIcon.GetItemIconType(equipItemData.type), equipItemData, t, haveEquipNum[i], needEquip[i].num, "EQUIP", i, false, getType);
                    itemIconEquipMaterial.SelectUniqueID(selectedUniqueIdList[i]);
                    SetLongTouch(itemIconEquipMaterial.transform, "EQUIP", i);
                }
            }
            else if (i < needItemSize && needMaterial != null)
            {
                int num2 = i - needEquipSize;
                ItemTable.ItemData itemData = Singleton <ItemTable> .I.GetItemData(needMaterial[num2].itemID);
                if (itemData != null)
                {
                    ItemIcon itemIcon = ItemIconMaterial.CreateMaterialIcon(ItemIcon.GetItemIconType(itemData.type), itemData, t, haveMaterialNum[num2], needMaterial[num2].num, "MATERIAL", num2, false);
                    SetLongTouch(itemIcon.transform, "MATERIAL", num2);
                    SetEvent(t, "MATERIAL", num2);
                }
            }
        });
        SetLabelText((Enum)UI.LBL_GOLD, needMoney.ToString("N0"));
        Color color = Color.get_white();

        if (needMaterial == null && needEquip == null)
        {
            color = Color.get_gray();
        }
        else if (MonoBehaviourSingleton <UserInfoManager> .I.userStatus.money < needMoney)
        {
            color = Color.get_red();
        }
        SetColor((Enum)UI.LBL_GOLD, color);
    }