private void SetItemIcon(uint itemID, Transform trans, UI target)
    {
        ItemTable.ItemData itemData = Singleton <ItemTable> .I.GetItemData(itemID);

        ItemIcon itemIcon = ItemIcon.Create(ITEM_ICON_TYPE.ITEM, itemData.iconID, itemData.rarity, FindCtrl(trans, target), ELEMENT_TYPE.MAX, null, -1, null, 0, false, -1, false, null, false, itemData.enemyIconID, itemData.enemyIconID2, false, GET_TYPE.PAY);

        if (itemIcon != null)
        {
            SetMaterialInfo(itemIcon.transform, REWARD_TYPE.ITEM, itemData.id, GetCtrl(UI.PNL_MATERIAL_INFO));
        }
    }
Ejemplo n.º 2
0
    private ItemIcon CreateIcon(AbilityItemSortData item_data, Transform parent, int index)
    {
        bool is_new = MonoBehaviourSingleton <InventoryManager> .I.IsNewItem(ITEM_ICON_TYPE.ABILITY_ITEM, item_data.GetUniqID());

        MonoBehaviourSingleton <InventoryManager> .I.AddShowFragsAbilityItem(item_data.GetUniqID());

        ItemTable.ItemData itemData = Singleton <ItemTable> .I.GetItemData(item_data.GetTableID());

        if (currentShowInventoryMode != SHOW_INVENTORY_MODE.SMALL)
        {
            return(ItemIconDetail.CreateMaterialIcon(item_data.GetIconType(), item_data.GetIconID(), item_data.GetRarity(), itemData, true, parent, item_data.GetNum(), item_data.GetName(), "SELECT_ITEM", index, -1, false, is_new));
        }
        return(ItemIconDetailSmall.CreateSmallMaterialIcon(item_data.GetIconType(), item_data.GetIconID(), item_data.GetRarity(), parent, item_data.GetNum(), item_data.GetName(), "SELECT_ITEM", index, -1, false, is_new, 0, 0, ItemIconDetail.ICON_STATUS.NONE));
    }
Ejemplo n.º 3
0
    protected void OnQuery_ABILITY_DATA_POPUP()
    {
        //IL_010b: Unknown result type (might be due to invalid IL or missing references)
        //IL_0118: Unknown result type (might be due to invalid IL or missing references)
        //IL_015c: Unknown result type (might be due to invalid IL or missing references)
        //IL_0169: Unknown result type (might be due to invalid IL or missing references)
        object[] array = GameSection.GetEventData() as object[];
        int      index = (int)array[0];
        string   text  = string.Empty;
        string   text2 = null;
        string   empty = string.Empty;

        LoginBonus.LoginBonusReward loginBonusReward = lb.next[index].reward[0];
        if (Singleton <ItemTable> .I.IsExistItemData((uint)loginBonusReward.itemId))
        {
            ItemTable.ItemData itemData = Singleton <ItemTable> .I.GetItemData((uint)loginBonusReward.itemId);

            if (itemData != null)
            {
                text  = itemData.name;
                text2 = itemData.text;
            }
        }
        if (string.IsNullOrEmpty(text))
        {
            text = loginBonusReward.name;
        }
        empty = "x" + loginBonusReward.itemNum.ToString();
        Vector3 localPosition = default(Vector3);

        localPosition._002Ector(0f, 60f, 0f);
        if (text2 != null)
        {
            SetLabelText(infoDetail, UI.LBL_INFODETAIL_NAME, text);
            SetLabelText(infoDetail, UI.LBL_INFODETAIL_DESC, text2);
            SetLabelText(infoDetail, UI.LBL_INFODETAIL_NUM, empty);
            infoDetail.set_localPosition(localPosition);
            infoDetail.get_gameObject().SetActive(true);
            isDetail = true;
        }
        else
        {
            SetLabelText(info, UI.LBL_INFO_NAME, text);
            SetLabelText(info, UI.LBL_INFO_NUM, empty);
            info.set_localPosition(localPosition);
            info.get_gameObject().SetActive(true);
            isDetail = false;
        }
        GameSection.StopEvent();
    }
Ejemplo n.º 4
0
        public override ItemIcon CreateIcon(object[] data)
        {
            SortCompareData sortCompareData = data[0] as SortCompareData;
            Transform       parent          = data[1] as Transform;
            int             event_data      = (int)data[2];
            bool            is_new          = MonoBehaviourSingleton <InventoryManager> .I.IsNewItem(ITEM_ICON_TYPE.ITEM, sortCompareData.GetUniqID());

            ItemTable.ItemData itemData = Singleton <ItemTable> .I.GetItemData(sortCompareData.GetTableID());

            ItemStorageTop.SHOW_INVENTORY_MODE sHOW_INVENTORY_MODE = (ItemStorageTop.SHOW_INVENTORY_MODE)(int) data[3];
            if (sHOW_INVENTORY_MODE != ItemStorageTop.SHOW_INVENTORY_MODE.SMALL)
            {
                return(ItemIconDetail.CreateMaterialIcon(sortCompareData.GetIconType(), sortCompareData.GetIconID(), sortCompareData.GetRarity(), itemData, sHOW_INVENTORY_MODE == ItemStorageTop.SHOW_INVENTORY_MODE.MAIN_STATUS, parent, sortCompareData.GetNum(), sortCompareData.GetName(), "SELECT", event_data, -1, false, is_new));
            }
            return(ItemIconDetailSmall.CreateSmallMaterialIcon(sortCompareData.GetIconType(), sortCompareData.GetIconID(), sortCompareData.GetRarity(), parent, sortCompareData.GetNum(), sortCompareData.GetName(), "SELECT", event_data, -1, false, is_new, 0, 0, ItemIconDetail.ICON_STATUS.NONE));
        }
Ejemplo n.º 5
0
    public override void UpdateUI()
    {
        ItemTable.ItemData itemData = Singleton <ItemTable> .I.GetItemData(createData.needMaterial[0].itemID);

        if (itemData != null)
        {
            int haveingItemNum = MonoBehaviourSingleton <InventoryManager> .I.GetHaveingItemNum(itemData.id);

            int      num      = createData.needMaterial[0].num;
            bool     flag     = haveingItemNum >= num;
            ItemIcon itemIcon = ItemIconMaterial.CreateMaterialIcon(ItemIcon.GetItemIconType(itemData.type), itemData, GetCtrl(UI.OBJ_ICON_ROOT), haveingItemNum, num, "MATERIAL", 0, false);
            SetMaterialInfo(itemIcon._transform, REWARD_TYPE.ITEM, itemData.id, null);
            SetActive((Enum)UI.BTN_OK, flag);
            SetActive((Enum)UI.BTN_INACTIVE, !flag);
            base.UpdateUI();
        }
    }
            protected override bool IsCondition(PointShopItem item)
            {
                if (item.type == 3)
                {
                    ItemTable.ItemData itemData = Singleton <ItemTable> .I.GetItemData((uint)item.itemId);

                    switch (itemData.type)
                    {
                    case ITEM_TYPE.MATERIAL_METAL:
                    case ITEM_TYPE.LITHOGRAPH:
                    case ITEM_TYPE.USE_ITEM:
                    case ITEM_TYPE.TICKET:
                        return(false);

                    default:
                        return(true);
                    }
                }
                return(false);
            }
            protected override bool IsCondition(PointShopItem item)
            {
                switch (item.type)
                {
                case 3:
                case 10:
                {
                    ItemTable.ItemData itemData = Singleton <ItemTable> .I.GetItemData((uint)item.itemId);

                    if (itemData.type == ITEM_TYPE.USE_ITEM)
                    {
                        return(false);
                    }
                    return(itemData.rarity == rarity);
                }

                case 4:
                {
                    EquipItemTable.EquipItemData equipItemData = Singleton <EquipItemTable> .I.GetEquipItemData((uint)item.itemId);

                    return(equipItemData.rarity == rarity);
                }

                case 6:
                {
                    QuestTable.QuestTableData questData = Singleton <QuestTable> .I.GetQuestData((uint)item.itemId);

                    return(questData.rarity == rarity);
                }

                case 5:
                {
                    SkillItemTable.SkillItemData skillItemData = Singleton <SkillItemTable> .I.GetSkillItemData((uint)item.itemId);

                    return(skillItemData.rarity == rarity);
                }

                default:
                    return(false);
                }
            }
Ejemplo n.º 8
0
        public string GetReplaceText()
        {
            string text = message;

            text = text.Replace("{USER_NAME}", MonoBehaviourSingleton <UserInfoManager> .I.userInfo.name);
            switch (type)
            {
            case NPC_MESSAGE_TYPE.EVENT_QUEST:
            case NPC_MESSAGE_TYPE.ORDER_QUEST:
            case NPC_MESSAGE_TYPE.DELIVERY_QUEST:
            case NPC_MESSAGE_TYPE.NEW_NORMAL_QUEST:
            case NPC_MESSAGE_TYPE.NEW_ORDER_QUEST:
            case NPC_MESSAGE_TYPE.NEW_EVENT_QUEST:
            case NPC_MESSAGE_TYPE.NEW_DELIVERY_QUEST:
            {
                string newValue = string.Empty;
                if (param != 0)
                {
                    QuestTable.QuestTableData questData = Singleton <QuestTable> .I.GetQuestData((uint)param);

                    if (questData != null)
                    {
                        newValue = questData.questText;
                    }
                }
                text = text.Replace("{QUEST_NAME}", newValue);
                break;
            }

            case NPC_MESSAGE_TYPE.ITEM_HAVE:
            case NPC_MESSAGE_TYPE.ITEM_NOT_HAVE:
                if (param != 0)
                {
                    ItemTable.ItemData itemData = Singleton <ItemTable> .I.GetItemData((uint)param);

                    text = text.Replace("{ITEM_NAME}", (itemData == null) ? string.Empty : itemData.name);
                }
                break;
            }
            return(text);
        }
Ejemplo n.º 9
0
    public void LoadItem(uint item_id, Transform parent, int layer, Action _callback = null)
    {
        if (itemID != item_id)
        {
            if (1000000 > item_id)
            {
                if (item_id != 1 && item_id != 2)
                {
                    item_id = 2u;
                }
                Init(DoLoadItem(item_id), parent, layer, -1, -1, _callback);
            }
            else
            {
                ItemTable.ItemData itemData = Singleton <ItemTable> .I.GetItemData(item_id);

                Init(DoLoadItem(itemData), parent, layer, -1, -1, _callback);
            }
            itemID = item_id;
        }
    }
    private void OnQuery_NEXT()
    {
        if (smithData == null)
        {
            GameSection.StopEvent();
        }
        else
        {
            selectIndex = (int)GameSection.GetEventData();
            int exceed  = smithData.selectEquipData.exceed;
            int needNum = (int)exceedData.exceed[selectIndex].getNeedNum(exceed + 1);
            ItemTable.ItemData itemData = Singleton <ItemTable> .I.GetItemData(exceedData.exceed[selectIndex].itemId);

            GameSection.SetEventData(new object[3]
            {
                itemData.name,
                needNum,
                smithData.selectEquipData.tableData.name
            });
        }
    }
Ejemplo n.º 11
0
    protected void OnQuery_GACHA()
    {
        if (MonoBehaviourSingleton <GachaManager> .I.selectGacha.IsEnd)
        {
            GameSection.ChangeEvent("END", null);
            SetGachaButtonActive(false);
        }
        else
        {
            string empty = string.Empty;
            if (MonoBehaviourSingleton <GachaManager> .I.selectGacha.requiredItemId > 0)
            {
                int ticketId = MonoBehaviourSingleton <GachaManager> .I.selectGacha.requiredItemId;
                int itemNum  = MonoBehaviourSingleton <InventoryManager> .I.GetItemNum((ItemInfo x) => x.tableData.id == ticketId, 1, false);

                ItemTable.ItemData itemData = Singleton <ItemTable> .I.GetItemData((uint)ticketId);

                empty = itemData.name + " " + MonoBehaviourSingleton <GachaManager> .I.selectGacha.needItemNum + StringTable.Get(STRING_CATEGORY.COMMON, 4000u) + "\n";
                if (MonoBehaviourSingleton <GachaManager> .I.selectGacha.needItemNum > itemNum)
                {
                    object[] event_data = new object[2]
                    {
                        itemData.name,
                        (MonoBehaviourSingleton <GachaManager> .I.selectGacha.needItemNum - itemNum).ToString() + StringTable.Get(STRING_CATEGORY.COMMON, 4000u)
                    };
                    GameSection.ChangeEvent("NOT_ENOUGH_GACHA_TICKET", event_data);
                    return;
                }
            }
            else
            {
                empty = StringTable.Get(STRING_CATEGORY.COMMON, 100u) + " " + GetCrystalNum() + StringTable.Get(STRING_CATEGORY.COMMON, 3000u);
            }
            GameSection.SetEventData(new object[1]
            {
                empty
            });
        }
    }
Ejemplo n.º 12
0
    public static InventoryList <SkillItemInfo, SkillItem> CreateListFromItem(List <Item> recv_list)
    {
        InventoryList <SkillItemInfo, SkillItem> list = new InventoryList <SkillItemInfo, SkillItem>();

        recv_list.ForEach(delegate(Item o)
        {
            ItemTable.ItemData itemData = Singleton <ItemTable> .I.GetItemData((uint)o.itemId);
            if (itemData.type == ITEM_TYPE.MATERIAL_MAGI && o.num > 0)
            {
                SkillItem item = new SkillItem
                {
                    uniqId      = o.uniqId,
                    skillItemId = o.itemId,
                    level       = (XorInt)1
                };
                list.Add(item);
                list.GetLastNode().Value.num    = o.num;
                list.GetLastNode().Value.itemId = (uint)o.itemId;
            }
        });
        return(list);
    }
Ejemplo n.º 13
0
    private LimitedEquipItemExceedData[] GetValidItemData()
    {
        DateTime now         = TimeManager.GetNow();
        DateTime dateDefault = default(DateTime);
        List <LimitedEquipItemExceedData> validData = new List <LimitedEquipItemExceedData>();

        limitedEquipItemExceedTable.ForEach(delegate(LimitedEquipItemExceedData o)
        {
            ItemTable.ItemData itemData = Singleton <ItemTable> .I.GetItemData(o.exceed.itemId);
            if (itemData != null && itemData.startDate <= now)
            {
                if (itemData.endDate.CompareTo(dateDefault) == 0 || itemData.endDate > now)
                {
                    validData.Add(o);
                }
                else if (MonoBehaviourSingleton <InventoryManager> .I.GetHaveingItemNum(itemData.id) > 0)
                {
                    validData.Add(o);
                }
            }
        });
        return(validData.ToArray());
    }
    public override void UpdateUI()
    {
        SetLabelText((Enum)UI.LBL_ITEM_NAME, item.GetName());
        SetLabelText((Enum)UI.LBL_TOTAL, $"{price:N0}");
        int enemy_icon_id  = 0;
        int enemy_icon_id2 = 0;

        if (item is ItemSortData)
        {
            ItemTable.ItemData itemData = Singleton <ItemTable> .I.GetItemData(item.GetTableID());

            if (itemData != null)
            {
                enemy_icon_id  = itemData.enemyIconID;
                enemy_icon_id2 = itemData.enemyIconID2;
            }
        }
        GET_TYPE getType  = item.GetGetType();
        ItemIcon itemIcon = ItemIcon.Create(item.GetIconType(), item.GetIconID(), item.GetRarity(), GetCtrl(UI.OBJ_ICON_ROOT), item.GetIconElement(), item.GetIconMagiEnableType(), num, null, -1, false, -1, false, null, false, enemy_icon_id, enemy_icon_id2, false, getType);

        itemIcon.SetRewardBG(true);
        base.UpdateUI();
    }
    protected virtual NeedMaterial[] CreateNeedMaterialAry()
    {
        SortCompareData[]   array  = sellData.ToArray();
        List <NeedMaterial> reward = new List <NeedMaterial>();

        Array.ForEach(array, delegate(SortCompareData _data)
        {
            EquipItemInfo equipItemInfo = _data.GetItemData() as EquipItemInfo;
            if (equipItemInfo != null)
            {
                uint lapis_id = 0u;
                EquipItemExceedTable.EquipItemExceedData equipItemExceedData = Singleton <EquipItemExceedTable> .I.GetEquipItemExceedData(equipItemInfo.tableData.rarity, equipItemInfo.tableData.getType, equipItemInfo.tableData.eventId);
                if (equipItemExceedData != null)
                {
                    lapis_id = equipItemExceedData.exchangeItemId;
                }
                if (lapis_id != 0)
                {
                    ItemTable.ItemData itemData = Singleton <ItemTable> .I.GetItemData(lapis_id);
                    if (itemData != null)
                    {
                        NeedMaterial needMaterial = reward.Find((NeedMaterial regist_lapis) => regist_lapis.itemID == lapis_id);
                        if (needMaterial == null)
                        {
                            reward.Add(new NeedMaterial(lapis_id, 1));
                        }
                        else
                        {
                            needMaterial.num++;
                        }
                    }
                }
            }
        });
        return(reward.ToArray());
    }
Ejemplo n.º 16
0
    public static void GetIconShowData(REWARD_TYPE reward_type, uint id, out int icon_id, out ITEM_ICON_TYPE icon_type, out RARITY_TYPE?rarity, out ELEMENT_TYPE element, out EQUIPMENT_TYPE?magi_enable_icon_type, out int enemy_icon_id, out int enemy_icon_id2, out GET_TYPE getType, int exceed_cnt = 0)
    {
        icon_type             = ITEM_ICON_TYPE.NONE;
        icon_id               = -1;
        rarity                = null;
        element               = ELEMENT_TYPE.MAX;
        magi_enable_icon_type = null;
        enemy_icon_id         = 0;
        enemy_icon_id2        = 0;
        getType               = GET_TYPE.PAY;
        switch (reward_type)
        {
        case REWARD_TYPE.CRYSTAL:
            icon_id   = 1;
            icon_type = ITEM_ICON_TYPE.CRYSTAL;
            break;

        case REWARD_TYPE.MONEY:
            icon_id = 2;
            break;

        case REWARD_TYPE.EXP:
            icon_id = 3;
            break;

        case REWARD_TYPE.ITEM:
        case REWARD_TYPE.ABILITY_ITEM:
        {
            ItemTable.ItemData itemData = Singleton <ItemTable> .I.GetItemData(id);

            if (itemData != null)
            {
                icon_type      = ((itemData.type != ITEM_TYPE.USE_ITEM) ? ITEM_ICON_TYPE.ITEM : ITEM_ICON_TYPE.USE_ITEM);
                icon_id        = itemData.iconID;
                rarity         = itemData.rarity;
                enemy_icon_id  = itemData.enemyIconID;
                enemy_icon_id2 = itemData.enemyIconID2;
            }
            break;
        }

        case REWARD_TYPE.EQUIP_ITEM:
        {
            EquipItemTable.EquipItemData equipItemData = Singleton <EquipItemTable> .I.GetEquipItemData(id);

            if (equipItemData != null)
            {
                icon_type = GetItemIconType(equipItemData.type);
                icon_id   = equipItemData.GetIconID(MonoBehaviourSingleton <UserInfoManager> .I.userStatus.sex);
                rarity    = equipItemData.rarity;
                element   = equipItemData.GetTargetElementPriorityToTable();
                getType   = equipItemData.getType;
            }
            break;
        }

        case REWARD_TYPE.SKILL_ITEM:
        {
            SkillItemTable.SkillItemData skillItemData = Singleton <SkillItemTable> .I.GetSkillItemData(id);

            if (skillItemData != null)
            {
                icon_type             = GetItemIconType(skillItemData.type);
                icon_id               = skillItemData.iconID;
                rarity                = skillItemData.rarity;
                element               = skillItemData.skillAtkType;
                magi_enable_icon_type = skillItemData.GetEnableEquipType();
            }
            break;
        }

        case REWARD_TYPE.QUEST_ITEM:
        {
            QuestTable.QuestTableData questData = Singleton <QuestTable> .I.GetQuestData(id);

            if (questData != null)
            {
                icon_type = GetItemIconType(questData.questType);
                EnemyTable.EnemyData enemyData = Singleton <EnemyTable> .I.GetEnemyData((uint)questData.GetMainEnemyID());

                icon_id = enemyData.iconId;
                rarity  = questData.rarity;
                element = enemyData.element;
            }
            break;
        }

        case REWARD_TYPE.AVATAR:
        case REWARD_TYPE.COMMON:
            icon_type = ITEM_ICON_TYPE.COMMON;
            icon_id   = (int)id;
            break;

        case REWARD_TYPE.STAMP:
            icon_type = ITEM_ICON_TYPE.STAMP;
            icon_id   = (int)id;
            break;

        case REWARD_TYPE.DEGREE:
            icon_type = ITEM_ICON_TYPE.DEGREE;
            icon_id   = (int)id;
            break;

        case REWARD_TYPE.POINT_SHOP_POINT:
            icon_type = ITEM_ICON_TYPE.POINT_SHOP_ICON;
            icon_id   = (int)id;
            break;
        }
    }
Ejemplo n.º 17
0
    private void SetItemIcon(Transform holder, ItemSortData data, Transform parent_scroll)
    {
        ITEM_ICON_TYPE iTEM_ICON_TYPE        = ITEM_ICON_TYPE.NONE;
        RARITY_TYPE?   rarity                = null;
        ELEMENT_TYPE   element               = ELEMENT_TYPE.MAX;
        EQUIPMENT_TYPE?magi_enable_icon_type = null;
        int            icon_id               = -1;
        int            num = -1;

        if (data != null)
        {
            iTEM_ICON_TYPE        = data.GetIconType();
            icon_id               = data.GetIconID();
            rarity                = data.GetRarity();
            element               = data.GetIconElement();
            magi_enable_icon_type = data.GetIconMagiEnableType();
            num = data.GetNum();
            if (num == 1)
            {
                num = -1;
            }
        }
        bool is_new = false;

        switch (iTEM_ICON_TYPE)
        {
        case ITEM_ICON_TYPE.ITEM:
        case ITEM_ICON_TYPE.QUEST_ITEM:
        {
            ulong uniqID = data.GetUniqID();
            if (uniqID != 0L)
            {
                is_new = MonoBehaviourSingleton <InventoryManager> .I.IsNewItem(iTEM_ICON_TYPE, data.GetUniqID());
            }
            break;
        }

        default:
            is_new = true;
            break;

        case ITEM_ICON_TYPE.NONE:
            break;
        }
        int enemy_icon_id = 0;

        if (iTEM_ICON_TYPE == ITEM_ICON_TYPE.ITEM)
        {
            ItemTable.ItemData itemData = Singleton <ItemTable> .I.GetItemData(data.GetTableID());

            enemy_icon_id = itemData.enemyIconID;
        }
        ItemIcon itemIcon = null;

        if (data.GetIconType() == ITEM_ICON_TYPE.QUEST_ITEM)
        {
            ItemIcon.ItemIconCreateParam itemIconCreateParam = new ItemIcon.ItemIconCreateParam();
            itemIconCreateParam.icon_type = data.GetIconType();
            itemIconCreateParam.icon_id   = data.GetIconID();
            itemIconCreateParam.rarity    = data.GetRarity();
            itemIconCreateParam.parent    = holder;
            itemIconCreateParam.element   = data.GetIconElement();
            itemIconCreateParam.magi_enable_equip_type = data.GetIconMagiEnableType();
            itemIconCreateParam.num               = data.GetNum();
            itemIconCreateParam.enemy_icon_id     = enemy_icon_id;
            itemIconCreateParam.questIconSizeType = ItemIcon.QUEST_ICON_SIZE_TYPE.REWARD_DELIVERY_LIST;
            itemIcon = ItemIcon.Create(itemIconCreateParam);
        }
        else
        {
            itemIcon = ItemIcon.Create(iTEM_ICON_TYPE, icon_id, rarity, holder, element, magi_enable_icon_type, -1, "DROP", 0, is_new, -1, false, null, false, enemy_icon_id, 0, false, GET_TYPE.PAY);
        }
        SetMaterialInfo(itemIcon.transform, data.GetMaterialType(), data.GetTableID(), parent_scroll);
    }
    public override void UpdateUI()
    {
        base.UpdateUI();
        if (iconData != null)
        {
            if (iconData is ItemSortData)
            {
                SetActive((Enum)UI.OBJ_EQUIP, false);
                SetActive((Enum)UI.OBJ_ITEM, true);
                ItemTable.ItemData itemData = Singleton <ItemTable> .I.GetItemData(iconData.GetTableID());

                SetLabelText((Enum)UI.LBL_ITEM_NAME, iconData.GetName());
                SetLabelText((Enum)UI.LBL_TEXT, itemData.text);
            }
            else if (iconData is EquipItemSortData)
            {
                SetActive((Enum)UI.OBJ_EQUIP, true);
                SetActive((Enum)UI.OBJ_ITEM, false);
                EquipItemTable.EquipItemData equipItemData = Singleton <EquipItemTable> .I.GetEquipItemData(iconData.GetTableID());

                SetLabelText((Enum)UI.LBL_ITEM_NAME, equipItemData.name);
                SetLabelText((Enum)UI.LBL_ATK, equipItemData.baseAtk.ToString());
                SetLabelText((Enum)UI.LBL_DEF, equipItemData.baseDef.ToString());
                int  fixedSkillLength = equipItemData.fixedSkillLength;
                UI[] array            = new UI[3]
                {
                    UI.LBL_SKILL_A,
                    UI.LBL_SKILL_B,
                    UI.LBL_SKILL_C
                };
                for (int i = 0; i < 3; i++)
                {
                    if (i < fixedSkillLength)
                    {
                        SkillItemTable.SkillItemData skillItemData = Singleton <SkillItemTable> .I.GetSkillItemData(equipItemData.GetSkillSlot(0)[i].skill_id);

                        if (skillItemData != null)
                        {
                            SetActive((Enum)array[i], true);
                            SetLabelText((Enum)array[i], skillItemData.name);
                        }
                        else
                        {
                            SetActive((Enum)array[i], false);
                        }
                    }
                    else
                    {
                        SetActive((Enum)array[i], false);
                    }
                }
            }
            else
            {
                SetActive((Enum)UI.OBJ_EQUIP, true);
                SetActive((Enum)UI.OBJ_ITEM, false);
                SkillItemTable.SkillItemData skillItemData2 = Singleton <SkillItemTable> .I.GetSkillItemData(iconData.GetTableID());

                SetLabelText((Enum)UI.LBL_ITEM_NAME, skillItemData2.name);
                SetLabelText((Enum)UI.LBL_ATK, skillItemData2.baseAtk.ToString());
                SetLabelText((Enum)UI.LBL_DEF, skillItemData2.baseDef.ToString());
                SetLabelText((Enum)UI.LBL_SKILL_A, string.Empty);
                SetLabelText((Enum)UI.LBL_SKILL_B, string.Empty);
                SetLabelText((Enum)UI.LBL_SKILL_C, string.Empty);
            }
        }
    }
    public override void UpdateUI()
    {
        base.UpdateUI();
        SetActive((Enum)UI.SPR_COUNT_0_ON, exceedCount > 0);
        SetActive((Enum)UI.SPR_COUNT_1_ON, exceedCount > 1);
        SetActive((Enum)UI.SPR_COUNT_2_ON, exceedCount > 2);
        SetActive((Enum)UI.SPR_COUNT_3_ON, exceedCount > 3);
        SetLabelText((Enum)UI.LBL_SELECT_NOW, (selectPageIndex + 1).ToString());
        UpdateBonusDetail(true);
        bool is_only_lapis = true;
        int  item_num      = exceedData.exceed.Length;

        SetGrid(UI.GRD_LAPIS, "SmithExceedItem", item_num, false, delegate(int i, Transform t, bool is_recycle)
        {
            //IL_0276: Unknown result type (might be due to invalid IL or missing references)
            //IL_0295: Unknown result type (might be due to invalid IL or missing references)
            //IL_02a3: Unknown result type (might be due to invalid IL or missing references)
            //IL_02a8: Unknown result type (might be due to invalid IL or missing references)
            //IL_02af: Unknown result type (might be due to invalid IL or missing references)
            //IL_02b4: Unknown result type (might be due to invalid IL or missing references)
            if (exceedCount >= 4)
            {
                SetActive(t, false);
            }
            else if (i < selectPageIndex * 3 || i >= (selectPageIndex + 1) * 3)
            {
                SetActive(t, false);
            }
            else
            {
                EquipItemExceedTable.EquipItemExceedData.ExceedNeedItem exceedNeedItem = exceedData.exceed[i];
                if (exceedNeedItem == null || exceedNeedItem.itemId == 0 || exceedNeedItem.num[exceedCount] == 0)
                {
                    SetActive(t, false);
                }
                else
                {
                    ItemTable.ItemData itemData = Singleton <ItemTable> .I.GetItemData(exceedNeedItem.itemId);
                    if (itemData == null)
                    {
                        SetActive(t, false);
                    }
                    else
                    {
                        if (itemData.type != ITEM_TYPE.LAPIS)
                        {
                            is_only_lapis = false;
                        }
                        SetActive(t, true);
                        int haveingItemNum = MonoBehaviourSingleton <InventoryManager> .I.GetHaveingItemNum(exceedNeedItem.itemId);
                        int num            = (int)exceedNeedItem.num[exceedCount];
                        ItemIcon.GetIconShowData(REWARD_TYPE.ITEM, exceedNeedItem.itemId, out int _, out ITEM_ICON_TYPE icon_type, out RARITY_TYPE? _, out ELEMENT_TYPE _, out EQUIPMENT_TYPE? _, out int _, out int _, out GET_TYPE _, 0);
                        Transform val     = FindCtrl(t, UI.OBJ_MATERIAL_ICON_ROOT);
                        bool flag2        = haveingItemNum >= num;
                        ItemIcon itemIcon = ItemIconMaterial.CreateMaterialIcon(icon_type, itemData, val, haveingItemNum, num, (!flag2) ? "NEED" : "NEXT", i, false);
                        SetMaterialInfo(itemIcon._transform, REWARD_TYPE.ITEM, exceedNeedItem.itemId, GetCtrl(UI.SCR_LAPIS_ROOT));
                        ItemIconMaterial itemIconMaterial = itemIcon as ItemIconMaterial;
                        if (itemIconMaterial != null)
                        {
                            itemIconMaterial.SetVisibleBG(false);
                        }
                        FindCtrl(val, UI.SPR_EXCEED_BTN_BG).set_parent(itemIcon._transform);
                        SetActive(t, UI.SPR_EXCEED_GRAYOUT, !flag2);
                        if (itemData.endDate != default(DateTime))
                        {
                            string format = StringTable.Get(STRING_CATEGORY.SHOP, 15u);
                            SetLabelText(t, UI.LBL_LIMITED, string.Format(format, itemData.endDate.ToString("yyyy/MM/dd HH:mm")));
                        }
                        else
                        {
                            SetActive(t, UI.OBJ_EXCEED_LIMITED, false);
                        }
                        if (!IsValidExceedSection())
                        {
                            if (itemIcon.GetComponent <UINoAuto>() == null)
                            {
                                itemIcon.get_gameObject().AddComponent <UINoAuto>();
                            }
                            if (itemIcon.GetComponent <UIButtonScale>() == null)
                            {
                                UIButtonScale uIButtonScale = itemIcon.get_gameObject().AddComponent <UIButtonScale>();
                                uIButtonScale.hover         = Vector3.get_one();
                                uIButtonScale.pressed       = UIButtonEffect.buttonScale_pressed;
                                uIButtonScale.duration      = UIButtonEffect.buttonScale_duration;
                            }
                        }
                    }
                }
            }
        });
        bool flag = exceedCount < 4;

        SetActive((Enum)UI.OBJ_VALID_EXCEED_ROOT, flag);
        SetActive((Enum)UI.OBJ_INVALID_EXCEED_ROOT, !flag);
        int    id   = (!is_only_lapis) ? 6 : 5;
        string text = StringTable.Get(STRING_CATEGORY.ITEM_DETAIL, (uint)id);

        SetLabelText((Enum)UI.LBL_USE_MATERIAL_NAME, text);
    }
Ejemplo n.º 20
0
 private IEnumerator DoLoadItem(ItemTable.ItemData data)
 {
     return(DoLoadItem((uint)data.iconID));
 }
    protected override bool HandleCoopEvent(CoopPacket packet)
    {
        //IL_01d9: Unknown result type (might be due to invalid IL or missing references)
        //IL_0290: Unknown result type (might be due to invalid IL or missing references)
        //IL_02ba: Unknown result type (might be due to invalid IL or missing references)
        //IL_037b: Unknown result type (might be due to invalid IL or missing references)
        //IL_04a7: Unknown result type (might be due to invalid IL or missing references)
        //IL_04be: Unknown result type (might be due to invalid IL or missing references)
        //IL_04c3: Unknown result type (might be due to invalid IL or missing references)
        //IL_04e9: Unknown result type (might be due to invalid IL or missing references)
        //IL_0533: Unknown result type (might be due to invalid IL or missing references)
        //IL_0564: Unknown result type (might be due to invalid IL or missing references)
        //IL_0569: Unknown result type (might be due to invalid IL or missing references)
        //IL_056e: Unknown result type (might be due to invalid IL or missing references)
        //IL_0573: Unknown result type (might be due to invalid IL or missing references)
        //IL_0585: Unknown result type (might be due to invalid IL or missing references)
        //IL_066e: Unknown result type (might be due to invalid IL or missing references)
        //IL_06b2: Unknown result type (might be due to invalid IL or missing references)
        //IL_0835: Unknown result type (might be due to invalid IL or missing references)
        //IL_085c: Unknown result type (might be due to invalid IL or missing references)
        //IL_0894: Unknown result type (might be due to invalid IL or missing references)
        //IL_08c1: Unknown result type (might be due to invalid IL or missing references)
        //IL_0931: Unknown result type (might be due to invalid IL or missing references)
        //IL_0965: Unknown result type (might be due to invalid IL or missing references)
        //IL_099d: Unknown result type (might be due to invalid IL or missing references)
        //IL_09c3: Unknown result type (might be due to invalid IL or missing references)
        //IL_09fb: Unknown result type (might be due to invalid IL or missing references)
        //IL_0a31: Unknown result type (might be due to invalid IL or missing references)
        //IL_0a38: Unknown result type (might be due to invalid IL or missing references)
        //IL_0a79: Unknown result type (might be due to invalid IL or missing references)
        //IL_0a93: Unknown result type (might be due to invalid IL or missing references)
        //IL_0a9a: Unknown result type (might be due to invalid IL or missing references)
        //IL_0dd0: Unknown result type (might be due to invalid IL or missing references)
        //IL_0e22: Unknown result type (might be due to invalid IL or missing references)
        //IL_0e58: Unknown result type (might be due to invalid IL or missing references)
        //IL_0ea9: Unknown result type (might be due to invalid IL or missing references)
        //IL_0ef4: Unknown result type (might be due to invalid IL or missing references)
        //IL_0f1a: Unknown result type (might be due to invalid IL or missing references)
        //IL_0f56: Unknown result type (might be due to invalid IL or missing references)
        //IL_102c: Unknown result type (might be due to invalid IL or missing references)
        //IL_105d: Unknown result type (might be due to invalid IL or missing references)
        //IL_1062: Unknown result type (might be due to invalid IL or missing references)
        //IL_1067: Unknown result type (might be due to invalid IL or missing references)
        //IL_106c: Unknown result type (might be due to invalid IL or missing references)
        //IL_107e: Unknown result type (might be due to invalid IL or missing references)
        //IL_10b6: Unknown result type (might be due to invalid IL or missing references)
        //IL_10ee: Unknown result type (might be due to invalid IL or missing references)
        //IL_117d: Unknown result type (might be due to invalid IL or missing references)
        //IL_11cd: Unknown result type (might be due to invalid IL or missing references)
        //IL_11fe: Unknown result type (might be due to invalid IL or missing references)
        //IL_122f: Unknown result type (might be due to invalid IL or missing references)
        //IL_1248: Unknown result type (might be due to invalid IL or missing references)
        switch (packet.packetType)
        {
        case PACKET_TYPE.PLAYER_LOAD_COMPLETE:
            if (!player.isSetAppearPos)
            {
                return(false);
            }
            if (player.playerSender != null)
            {
                player.playerSender.OnRecvLoadComplete(packet.fromClientId);
            }
            break;

        case PACKET_TYPE.PLAYER_INITIALIZE:
        {
            if (player.isLoading)
            {
                return(false);
            }
            Coop_Model_PlayerInitialize model32 = packet.GetModel <Coop_Model_PlayerInitialize>();
            player.ApplySyncPosition(model32.pos, model32.dir, true);
            player.hp     = model32.hp;
            player.healHp = model32.healHp;
            player.StopCounter(model32.stopcounter);
            StageObject target = null;
            if (model32.target_id >= 0)
            {
                target = MonoBehaviourSingleton <StageObjectManager> .I.FindCharacter(model32.target_id);
            }
            player.SetActionTarget(target, true);
            player.buffParam.SetSyncParam(model32.buff_sync_param, true);
            if (MonoBehaviourSingleton <InGameRecorder> .IsValid())
            {
                MonoBehaviourSingleton <InGameRecorder> .I.ApplySyncOwnerData(model32.id);
            }
            MonoBehaviourSingleton <StageObjectManager> .I.RemoveCacheObject(player);

            player.get_gameObject().SetActive(true);
            SetFilterMode(FILTER_MODE.NONE);
            player.isCoopInitialized = true;
            player.SetAppearPos(player._position);
            bool flag = false;
            if (player.weaponData == null != (model32.weapon_item == null))
            {
                flag = true;
            }
            else if (player.weaponData != null && player.weaponData.eId != model32.weapon_item.eId)
            {
                flag = true;
            }
            else if (player.weaponIndex != model32.weapon_index)
            {
                flag = true;
            }
            CoopClient coopClient = MonoBehaviourSingleton <CoopManager> .I.coopRoom.clients.FindByClientId(packet.fromClientId);

            if (coopClient != null && !coopClient.IsBattleStart())
            {
                player.WaitBattleStart();
                player.get_gameObject().SetActive(false);
                MonoBehaviourSingleton <StageObjectManager> .I.AddCacheObject(player);
            }
            else if (flag)
            {
                player.LoadWeapon(model32.weapon_item, model32.weapon_index, delegate
                    {
                        player.ActBattleStart(true);
                    });
            }
            else
            {
                player.SetNowWeapon(model32.weapon_item, model32.weapon_index);
                player.InitParameter();
                if (player.hp <= 0)
                {
                    player.ActBattleStart(true);
                    if (!player.isDead)
                    {
                        player.ActDeadLoop(false, 0f, 0f);
                    }
                }
                else if (model32.act_battle_start)
                {
                    player.ActBattleStart(false);
                }
                else
                {
                    player.ActBattleStart(true);
                    player.ActIdle(false, -1f);
                }
            }
            player.SetSyncUsingCannon(model32.cannonId);
            break;
        }

        case PACKET_TYPE.PLAYER_ATTACK_COMBO:
        {
            if (base.character.isDead)
            {
                return(true);
            }
            Coop_Model_PlayerAttackCombo model15 = packet.GetModel <Coop_Model_PlayerAttackCombo>();
            base.owner._position = model15.pos;
            base.owner._rotation = Quaternion.AngleAxis(model15.dir, Vector3.get_up());
            player.ActAttack(model15.attack_id, true, false);
            player.SetActionPosition(model15.act_pos, model15.act_pos_f);
            break;
        }

        case PACKET_TYPE.PLAYER_CHARGE_RELEASE:
        {
            if (base.character.isDead)
            {
                return(true);
            }
            Coop_Model_PlayerChargeRelease model36 = packet.GetModel <Coop_Model_PlayerChargeRelease>();
            player.ApplySyncExRush(model36.isExRushCharge);
            player.ApplySyncPosition(model36.pos, model36.dir, false);
            player.SetChargeRelease(model36.charge_rate);
            player.SetLerpRotation(Quaternion.AngleAxis(model36.lerp_dir, Vector3.get_up()) * Vector3.get_forward());
            player.SetActionPosition(model36.act_pos, model36.act_pos_f);
            break;
        }

        case PACKET_TYPE.PLAYER_RESTRAINT:
        {
            if (base.character.isDead)
            {
                return(true);
            }
            Coop_Model_PlayerRestraint model33 = packet.GetModel <Coop_Model_PlayerRestraint>();
            RestraintInfo restraintInfo        = new RestraintInfo();
            restraintInfo.enable            = true;
            restraintInfo.duration          = model33.duration;
            restraintInfo.damageInterval    = model33.damageInterval;
            restraintInfo.damageRate        = model33.damageRate;
            restraintInfo.reduceTimeByFlick = model33.reduceTimeByFlick;
            restraintInfo.effectName        = model33.effectName;
            restraintInfo.isStopMotion      = model33.isStopMotion;
            player.ActRestraint(restraintInfo);
            break;
        }

        case PACKET_TYPE.PLAYER_RESTRAINT_END:
            if (base.character.isDead)
            {
                return(true);
            }
            player.ActRestraintEnd();
            break;

        case PACKET_TYPE.PLAYER_AVOID:
        {
            if (base.character.isDead)
            {
                return(true);
            }
            Coop_Model_PlayerAvoid model38 = packet.GetModel <Coop_Model_PlayerAvoid>();
            player.ApplySyncPosition(model38.pos, model38.dir, false);
            player.ActAvoid();
            break;
        }

        case PACKET_TYPE.PLAYER_WARP:
        {
            if (base.character.isDead)
            {
                return(true);
            }
            Coop_Model_PlayerWarp model19 = packet.GetModel <Coop_Model_PlayerWarp>();
            player.ApplySyncPosition(model19.pos, model19.dir, false);
            player.ActWarp();
            break;
        }

        case PACKET_TYPE.PLAYER_BLOW_CLEAR:
            if (base.character.isDead)
            {
                return(true);
            }
            player.InputBlowClear();
            break;

        case PACKET_TYPE.PLAYER_STUNNED_END:
            if (base.character.isDead)
            {
                return(true);
            }
            player.SetStunnedEnd();
            break;

        case PACKET_TYPE.PLAYER_DEAD_COUNT:
        {
            Coop_Model_PlayerDeadCount model3 = packet.GetModel <Coop_Model_PlayerDeadCount>();
            player.DeadCount(model3.remaind_time, model3.stop);
            break;
        }

        case PACKET_TYPE.PLAYER_DEAD_STANDUP:
        {
            Coop_Model_PlayerDeadStandup model47 = packet.GetModel <Coop_Model_PlayerDeadStandup>();
            player.ActDeadStandup(model47.standupHp, model47.cType);
            break;
        }

        case PACKET_TYPE.PLAYER_STOP_COUNTER:
        {
            Coop_Model_PlayerStopCounter model46 = packet.GetModel <Coop_Model_PlayerStopCounter>();
            player.StopCounter(model46.stop);
            break;
        }

        case PACKET_TYPE.PLAYER_GATHER:
        {
            if (base.character.isDead)
            {
                return(true);
            }
            Coop_Model_PlayerGather model13           = packet.GetModel <Coop_Model_PlayerGather>();
            GatherPointObject       gatherPointObject = null;
            if (MonoBehaviourSingleton <InGameProgress> .IsValid() && MonoBehaviourSingleton <InGameProgress> .I.gatherPointList != null)
            {
                int i = 0;
                for (int count = MonoBehaviourSingleton <InGameProgress> .I.gatherPointList.Count; i < count; i++)
                {
                    if (model13.point_id == (int)MonoBehaviourSingleton <InGameProgress> .I.gatherPointList[i].pointData.pointID)
                    {
                        gatherPointObject = MonoBehaviourSingleton <InGameProgress> .I.gatherPointList[i];
                        break;
                    }
                }
            }
            if (gatherPointObject != null)
            {
                player.ApplySyncPosition(model13.pos, model13.dir, false);
                player.ActGather(gatherPointObject);
                player.SetActionPosition(model13.act_pos, model13.act_pos_f);
            }
            break;
        }

        case PACKET_TYPE.PLAYER_SKILL_ACTION:
        {
            if (base.character.isDead)
            {
                return(true);
            }
            Coop_Model_PlayerSkillAction model8 = packet.GetModel <Coop_Model_PlayerSkillAction>();
            player.ApplySyncPosition(model8.pos, model8.dir, false);
            player.ActSkillAction(model8.skill_index);
            player.SetActionPosition(model8.act_pos, model8.act_pos_f);
            break;
        }

        case PACKET_TYPE.PLAYER_GET_HEAL:
        {
            Coop_Model_PlayerGetHeal model7 = packet.GetModel <Coop_Model_PlayerGetHeal>();
            player.OnGetHeal(model7.heal_hp, (HEAL_TYPE)model7.heal_type, !model7.receive, (HEAL_EFFECT_TYPE)model7.effect_type, true);
            break;
        }

        case PACKET_TYPE.PLAYER_SPECIAL_ACTION:
        {
            if (base.character.isDead)
            {
                return(true);
            }
            Coop_Model_PlayerSpecialAction model2 = packet.GetModel <Coop_Model_PlayerSpecialAction>();
            player.ApplySyncPosition(model2.pos, model2.dir, false);
            player.ActSpecialAction(model2.start_effect, model2.isSuccess);
            player.SetActionPosition(model2.act_pos, model2.act_pos_f);
            break;
        }

        case PACKET_TYPE.PLAYER_SPECIAL_ACTION_CONTINUE:
        {
            if (base.character.isDead)
            {
                return(true);
            }
            Coop_Model_PlayerSpecialActionContinue model39 = packet.GetModel <Coop_Model_PlayerSpecialActionContinue>();
            player.ApplySyncPosition(model39.pos, model39.dir, false);
            player.ActSpAttackContinue();
            player.SetActionPosition(model39.act_pos, model39.act_pos_f);
            break;
        }

        case PACKET_TYPE.PLAYER_SHOT_ARROW:
        {
            if (base.character.isDead)
            {
                return(true);
            }
            Coop_Model_PlayerShotArrow model35 = packet.GetModel <Coop_Model_PlayerShotArrow>();
            player.ApplySyncPosition(model35.pos, model35.dir, false);
            AttackInfo attack_info = player.FindAttackInfoExternal(model35.attack_name, true, model35.attack_rate);
            player.ShotArrow(model35.shot_pos, model35.shot_rot, attack_info, model35.is_sit_shot, model35.is_aim_end);
            break;
        }

        case PACKET_TYPE.PLAYER_SHOT_SOUL_ARROW:
        {
            if (base.character.isDead)
            {
                return(true);
            }
            Coop_Model_PlayerShotSoulArrow model26 = packet.GetModel <Coop_Model_PlayerShotSoulArrow>();
            player.ApplySyncPosition(model26.pos, model26.dir, false);
            player.ShotSoulArrowPuppet(model26.shotPos, model26.bowRot, model26.targetPosList);
            break;
        }

        case PACKET_TYPE.PLAYER_UPDATE_SKILL_INFO:
        {
            Coop_Model_PlayerUpdateSkillInfo model25 = packet.GetModel <Coop_Model_PlayerUpdateSkillInfo>();
            player.skillInfo.SetSettingsInfo(model25.settings_info, player.equipWeaponList);
            break;
        }

        case PACKET_TYPE.PLAYER_PRAYER_START:
        {
            Coop_Model_PlayerPrayerStart model23 = packet.GetModel <Coop_Model_PlayerPrayerStart>();
            player.OnPrayerStart(model23.sid);
            break;
        }

        case PACKET_TYPE.PLAYER_PRAYER_END:
        {
            Coop_Model_PlayerPrayerEnd model22 = packet.GetModel <Coop_Model_PlayerPrayerEnd>();
            player.OnPrayerEnd(model22.sid);
            break;
        }

        case PACKET_TYPE.PLAYER_PRAYER_BOOST:
        {
            Coop_Model_PlayerPrayerBoost model20 = packet.GetModel <Coop_Model_PlayerPrayerBoost>();
            player.OnPrayerBoost(model20.sid, model20.isBoost);
            break;
        }

        case PACKET_TYPE.PLAYER_CHANGE_WEAPON:
            if (base.character.isDead)
            {
                return(true);
            }
            player.ActChangeWeapon(null, -1);
            break;

        case PACKET_TYPE.PLAYER_APPLY_CHANGE_WEAPON:
        {
            Coop_Model_PlayerApplyChangeWeapon model12 = packet.GetModel <Coop_Model_PlayerApplyChangeWeapon>();
            if (player.weaponData.eId == (uint)model12.item.eId && player.weaponIndex == model12.index)
            {
                return(true);
            }
            player.ApplyChangeWeapon(model12.item, model12.index);
            break;
        }

        case PACKET_TYPE.PLAYER_SETSTATUS:
        {
            Coop_Model_PlayerSetStatus model10 = packet.GetModel <Coop_Model_PlayerSetStatus>();
            player.OnSetPlayerStatus(model10.level, model10.atk, model10.def, model10.hp, true, null);
            if (MonoBehaviourSingleton <UIPlayerAnnounce> .IsValid())
            {
                MonoBehaviourSingleton <UIPlayerAnnounce> .I.Announce(UIPlayerAnnounce.ANNOUNCE_TYPE.LEVEL_UP, player);
            }
            break;
        }

        case PACKET_TYPE.PLAYER_GET_RAREDROP:
            if (MonoBehaviourSingleton <UIInGameMessageBar> .IsValid())
            {
                Coop_Model_PlayerGetRareDrop model5 = packet.GetModel <Coop_Model_PlayerGetRareDrop>();
                string text = null;
                switch (model5.type)
                {
                case 5:
                {
                    SkillItemTable.SkillItemData skillItemData = Singleton <SkillItemTable> .I.GetSkillItemData((uint)model5.item_id);

                    if (skillItemData != null)
                    {
                        text = skillItemData.name;
                    }
                    break;
                }

                case 4:
                {
                    EquipItemTable.EquipItemData equipItemData = Singleton <EquipItemTable> .I.GetEquipItemData((uint)model5.item_id);

                    if (equipItemData != null)
                    {
                        text = equipItemData.name;
                    }
                    break;
                }

                default:
                {
                    ItemTable.ItemData itemData = Singleton <ItemTable> .I.GetItemData((uint)model5.item_id);

                    if (itemData != null)
                    {
                        text = itemData.name;
                    }
                    break;
                }
                }
                if (text != null)
                {
                    MonoBehaviourSingleton <UIInGameMessageBar> .I.Announce(player.charaName, StringTable.Format(STRING_CATEGORY.IN_GAME, 4000u, text));
                }
            }
            break;

        case PACKET_TYPE.PLAYER_GRABBED:
        {
            if (base.character.isDead)
            {
                return(true);
            }
            Coop_Model_PlayerGrabbed model48 = packet.GetModel <Coop_Model_PlayerGrabbed>();
            GrabInfo grabInfo = new GrabInfo();
            grabInfo.parentNode    = model48.nodeName;
            grabInfo.duration      = model48.duration;
            grabInfo.drainAttackId = model48.drainAtkId;
            player.ActGrabbedStart(model48.enemyId, grabInfo);
            break;
        }

        case PACKET_TYPE.PLAYER_GRABBED_END:
        {
            if (base.character.isDead)
            {
                return(true);
            }
            Coop_Model_PlayerGrabbedEnd model45 = packet.GetModel <Coop_Model_PlayerGrabbedEnd>();
            player.ActGrabbedEnd(model45.angle, model45.power);
            break;
        }

        case PACKET_TYPE.PLAYER_SET_PRESENT_BULLET:
        {
            Coop_Model_PlayerSetPresentBullet model44 = packet.GetModel <Coop_Model_PlayerSetPresentBullet>();
            player.SetPresentBullet(model44.presentBulletId, (BulletData.BulletPresent.TYPE)model44.type, model44.position, model44.bulletName);
            break;
        }

        case PACKET_TYPE.PLAYER_PICK_PRESENT_BULLET:
        {
            Coop_Model_PlayerPickPresentBullet model43 = packet.GetModel <Coop_Model_PlayerPickPresentBullet>();
            player.DestroyPresentBulletObject(model43.presentBulletId);
            break;
        }

        case PACKET_TYPE.PLAYER_SHOT_ZONE_BULLET:
        {
            Coop_Model_PlayerShotZoneBullet model42 = packet.GetModel <Coop_Model_PlayerShotZoneBullet>();
            player.ShotZoneBullet(player, model42.bulletName, model42.position, false, false);
            break;
        }

        case PACKET_TYPE.PLAYER_SHOT_DECOY_BULLET:
        {
            Coop_Model_PlayerShotDecoyBullet model41 = packet.GetModel <Coop_Model_PlayerShotDecoyBullet>();
            player.ShotDecoyBullet(model41.id, model41.decoyId, model41.bulletName, model41.position, false);
            break;
        }

        case PACKET_TYPE.PLAYER_EXPLODE_DECOY_BULLET:
        {
            Coop_Model_PlayerExplodeDecoyBullet model40 = packet.GetModel <Coop_Model_PlayerExplodeDecoyBullet>();
            player.ExplodeDecoyBullet(model40.decoyId);
            break;
        }

        case PACKET_TYPE.PLAYER_CANNON_STANDBY:
        {
            if (base.character.isDead)
            {
                return(true);
            }
            Coop_Model_PlayerCannonStandby model37 = packet.GetModel <Coop_Model_PlayerCannonStandby>();
            player.ApplySyncPosition(model37.pos, model37.dir, false);
            player.ActCannonStandby(model37.cannonId);
            break;
        }

        case PACKET_TYPE.PLAYER_CANNON_SHOT:
        {
            if (base.character.isDead)
            {
                return(true);
            }
            Coop_Model_PlayerCannonShot model34 = packet.GetModel <Coop_Model_PlayerCannonShot>();
            player.ApplySyncPosition(model34.pos, model34.dir, false);
            player.SetCannonState(Player.CANNON_STATE.READY);
            player.ApplyCannonVector(model34.cannonVec);
            player.ActCannonShot();
            break;
        }

        case PACKET_TYPE.PLAYER_CANNON_ROTATE:
        {
            if (base.character.isDead)
            {
                return(true);
            }
            Coop_Model_PlayerCannonRotate model31 = packet.GetModel <Coop_Model_PlayerCannonRotate>();
            player.SetSyncCannonRotation(model31.cannonVec);
            break;
        }

        case PACKET_TYPE.PLAYER_GET_CHARGE_SKILLGAUGE:
        {
            Coop_Model_PlayerGetChargeSkillGauge model30 = packet.GetModel <Coop_Model_PlayerGetChargeSkillGauge>();
            player.OnGetChargeSkillGauge((BuffParam.BUFFTYPE)model30.buffType, model30.buffValue, model30.useSkillIndex, !model30.receive);
            break;
        }

        case PACKET_TYPE.PLAYER_RESURRECT:
        {
            Coop_Model_PlayerResurrect model29 = packet.GetModel <Coop_Model_PlayerResurrect>();
            player.OnResurrection(true);
            break;
        }

        case PACKET_TYPE.PLAYER_GET_RESURRECT:
        {
            Coop_Model_PlayerGetResurrect model28 = packet.GetModel <Coop_Model_PlayerGetResurrect>();
            player.OnGetResurrection();
            break;
        }

        case PACKET_TYPE.PLAYER_SPECIAL_ACTION_GAUGE_SYNC:
        {
            Coop_Model_PlayerSpecialActionGaugeSync model27 = packet.GetModel <Coop_Model_PlayerSpecialActionGaugeSync>();
            player.OnSyncSpecialActionGauge(model27.weaponIndex, model27.currentSpActionGauge);
            player.pairSwordsCtrl.SetComboLv(model27.comboLv);
            break;
        }

        case PACKET_TYPE.PLAYER_CHARGE_EXPAND_RELEASE:
        {
            if (base.character.isDead)
            {
                return(true);
            }
            Coop_Model_PlayerChargeExpandRelease model24 = packet.GetModel <Coop_Model_PlayerChargeExpandRelease>();
            player.ApplySyncPosition(model24.pos, model24.dir, false);
            player.SetChargeExpandRelease(model24.charge_rate);
            player.SetLerpRotation(Quaternion.AngleAxis(model24.lerp_dir, Vector3.get_up()) * Vector3.get_forward());
            player.SetActionPosition(model24.act_pos, model24.act_pos_f);
            break;
        }

        case PACKET_TYPE.PLAYER_JUMP_RIZE:
        {
            if (base.character.isDead)
            {
                return(true);
            }
            Coop_Model_PlayerJumpRize model21 = packet.GetModel <Coop_Model_PlayerJumpRize>();
            player.OnJumpRize(model21.dir, model21.level);
            break;
        }

        case PACKET_TYPE.PLAYER_JUMP_END:
        {
            if (base.character.isDead)
            {
                return(true);
            }
            Coop_Model_PlayerJumpEnd model18 = packet.GetModel <Coop_Model_PlayerJumpEnd>();
            player.OnJumpEnd(model18.pos, model18.isSuccess, model18.y);
            break;
        }

        case PACKET_TYPE.PLAYER_SOUL_BOOST:
        {
            Coop_Model_PlayerSoulBoost model17 = packet.GetModel <Coop_Model_PlayerSoulBoost>();
            player.OnSoulBoost(model17.isBoost);
            break;
        }

        case PACKET_TYPE.PLAYER_EVOLVE_ACTION_SYNC:
        {
            if (base.character.isDead)
            {
                return(true);
            }
            Coop_Model_PlayerEvolveActionSync model16 = packet.GetModel <Coop_Model_PlayerEvolveActionSync>();
            player.OnSyncEvolveAction(model16.isAction);
            break;
        }

        case PACKET_TYPE.PLAYER_EVOLVE_SPECIAL_ACTION:
        {
            if (base.character.isDead)
            {
                return(true);
            }
            Coop_Model_PlayerEvolveSpecialAction model14 = packet.GetModel <Coop_Model_PlayerEvolveSpecialAction>();
            player.ApplySyncPosition(model14.pos, model14.dir, false);
            player.ActEvolveSpecialAction();
            break;
        }

        case PACKET_TYPE.PLAYER_SNATCH_POS:
        {
            if (base.character.isDead)
            {
                return(true);
            }
            Coop_Model_PlayerSnatchPos model11 = packet.GetModel <Coop_Model_PlayerSnatchPos>();
            player.snatchCtrl.OnHit(model11.enemyId, model11.hitPoint);
            break;
        }

        case PACKET_TYPE.PLAYER_SNATCH_MOVE_START:
        {
            if (base.character.isDead)
            {
                return(true);
            }
            Coop_Model_PlayerSnatchMoveStart model9 = packet.GetModel <Coop_Model_PlayerSnatchMoveStart>();
            player.OnSnatchMoveStart(model9.snatchPos);
            break;
        }

        case PACKET_TYPE.PLAYER_SNATCH_MOVE_END:
        {
            if (base.character.isDead)
            {
                return(true);
            }
            Coop_Model_PlayerSnatchMoveEnd model6 = packet.GetModel <Coop_Model_PlayerSnatchMoveEnd>();
            player.SetActionPosition(model6.act_pos, model6.act_pos_f);
            player.ApplySyncPosition(model6.pos, model6.dir, false);
            player.OnSnatchMoveEnd(model6.triggerIndex);
            break;
        }

        case PACKET_TYPE.PLAYER_PAIR_SWORDS_LASER_END:
        {
            if (base.character.isDead)
            {
                return(true);
            }
            Coop_Model_PlayerPairSwordsLaserEnd model4 = packet.GetModel <Coop_Model_PlayerPairSwordsLaserEnd>();
            player.OnSyncSpecialActionGauge(model4.weaponIndex, model4.currentSpActionGauge);
            player.pairSwordsCtrl.OnLaserEnd(true);
            break;
        }

        case PACKET_TYPE.PLAYER_SHOT_HEALING_HOMING:
        {
            if (base.character.isDead)
            {
                return(true);
            }
            Coop_Model_PlayerShotHealingHoming model = packet.GetModel <Coop_Model_PlayerShotHealingHoming>();
            player.OnShotHealingHoming(model);
            break;
        }

        default:
            return(base.HandleCoopEvent(packet));
        }
        if (QuestManager.IsValidInGameExplore())
        {
            CoopClient coopClient2 = MonoBehaviourSingleton <CoopManager> .I.coopRoom.clients.FindByClientId(packet.fromClientId);

            if (coopClient2 != null)
            {
                MonoBehaviourSingleton <QuestManager> .I.UpdateExplorePlayerStatus(coopClient2);
            }
        }
        return(true);
    }
Ejemplo n.º 22
0
    public override void UpdateUI()
    {
        SetActive((Enum)UI.BTN_NEXT, false);
        SetActive((Enum)UI.OBJ_BONUS_POINT_SHOP, false);
        SetGrid(UI.GRD_DROP_ITEM, null, dropItemIconData.Length, true, delegate(int i, Transform o, bool is_recycle)
        {
            //IL_0287: Unknown result type (might be due to invalid IL or missing references)
            //IL_028c: Unknown result type (might be due to invalid IL or missing references)
            ITEM_ICON_TYPE iTEM_ICON_TYPE        = ITEM_ICON_TYPE.NONE;
            RARITY_TYPE?rarity                   = null;
            ELEMENT_TYPE element                 = ELEMENT_TYPE.MAX;
            EQUIPMENT_TYPE?magi_enable_icon_type = null;
            int icon_id = -1;
            int num     = -1;
            if (i < dropItemIconData.Length && dropItemIconData[i] != null)
            {
                iTEM_ICON_TYPE        = dropItemIconData[i].GetIconType();
                icon_id               = dropItemIconData[i].GetIconID();
                rarity                = dropItemIconData[i].GetRarity();
                element               = dropItemIconData[i].GetIconElement();
                magi_enable_icon_type = dropItemIconData[i].GetIconMagiEnableType();
                num = dropItemIconData[i].GetNum();
                if (num == 1)
                {
                    num = -1;
                }
            }
            bool is_new = false;
            switch (iTEM_ICON_TYPE)
            {
            case ITEM_ICON_TYPE.ITEM:
            case ITEM_ICON_TYPE.QUEST_ITEM:
                {
                    ulong uniqID = dropItemIconData[i].GetUniqID();
                    if (uniqID != 0L)
                    {
                        is_new = MonoBehaviourSingleton <InventoryManager> .I.IsNewItem(iTEM_ICON_TYPE, dropItemIconData[i].GetUniqID());
                    }
                    break;
                }

            default:
                is_new = true;
                break;

            case ITEM_ICON_TYPE.NONE:
                break;
            }
            int enemy_icon_id = 0;
            if (iTEM_ICON_TYPE == ITEM_ICON_TYPE.ITEM)
            {
                ItemTable.ItemData itemData = Singleton <ItemTable> .I.GetItemData(dropItemIconData[i].GetTableID());
                enemy_icon_id = itemData.enemyIconID;
            }
            ItemIcon itemIcon = null;
            if (dropItemIconData[i].GetIconType() == ITEM_ICON_TYPE.QUEST_ITEM)
            {
                itemIcon = ItemIcon.Create(new ItemIcon.ItemIconCreateParam
                {
                    icon_type = dropItemIconData[i].GetIconType(),
                    icon_id   = dropItemIconData[i].GetIconID(),
                    rarity    = new RARITY_TYPE?(dropItemIconData[i].GetRarity()),
                    parent    = o,
                    element   = dropItemIconData[i].GetIconElement(),
                    magi_enable_equip_type = dropItemIconData[i].GetIconMagiEnableType(),
                    num               = dropItemIconData[i].GetNum(),
                    enemy_icon_id     = enemy_icon_id,
                    questIconSizeType = ItemIcon.QUEST_ICON_SIZE_TYPE.REWARD_DELIVERY_LIST
                });
            }
            else
            {
                GET_TYPE getType = dropItemIconData[i].GetGetType();
                itemIcon         = ItemIcon.Create(iTEM_ICON_TYPE, icon_id, rarity, o, element, magi_enable_icon_type, num, "DROP", i, is_new, -1, false, null, false, enemy_icon_id, 0, false, getType);
            }
            itemIcon.SetRewardBG(true);
            itemIcon.SetRewardCategoryInfo(dropItemIconData[i].GetCategory());
            SetMaterialInfo(itemIcon.transform, dropItemIconData[i].GetMaterialType(), dropItemIconData[i].GetTableID(), GetCtrl(UI.PNL_MATERIAL_INFO));
            itemIcon.transform.FindChild("MaterialInfo").get_gameObject().SetActive(false);
            Transform val = SetPrefab(o, "QuestResultDropIconOpener", true);
            QuestResultDropIconOpener.Info info2 = new QuestResultDropIconOpener.Info
            {
                IsRare   = ResultUtility.IsRare(dropItemIconData[i]),
                IsBroken = ResultUtility.IsBreakReward(dropItemIconData[i])
            };
            val.GetComponent <QuestResultDropIconOpener>().Initialized(itemIcon, info2, delegate(Transform t, QuestResultDropIconOpener.Info info, bool is_skip)
            {
                string ui_effect_name = "ef_ui_dropitem_silver_01";
                if (info.IsBroken)
                {
                    ui_effect_name = "ef_ui_dropitem_red_01";
                }
                else if (info.IsRare)
                {
                    ui_effect_name = "ef_ui_dropitem_gold_01";
                }
                SetVisibleWidgetOneShotEffect(GetCtrl(dropItemSCR), t, ui_effect_name);
            });
        });
        base.GetComponent <UITable>((Enum)UI.TBL_GUILD_REQUEST_RESULT).Reposition();
        TreasureStart();
    }
    public string GetRewardName(REWARD_TYPE rewardType, uint itemId, uint num, uint param0)
    {
        string text = string.Empty;

        switch (rewardType)
        {
        case REWARD_TYPE.CRYSTAL:
            text = num.ToString() + " " + StringTable.Get(STRING_CATEGORY.COMMON, 100u) + " " + StringTable.Get(STRING_CATEGORY.COMMON, 3000u);
            break;

        case REWARD_TYPE.MONEY:
            text = num.ToString() + " " + StringTable.Get(STRING_CATEGORY.COMMON, 101u);
            break;

        case REWARD_TYPE.EXP:
            text = StringTable.Get(STRING_CATEGORY.COMMON, 102u);
            break;

        case REWARD_TYPE.ITEM:
        {
            ItemTable.ItemData itemData = Singleton <ItemTable> .I.GetItemData(itemId);

            if (itemData != null)
            {
                text = itemData.name;
                if (num > 1)
                {
                    text = num.ToString() + " " + text + " " + StringTable.Get(STRING_CATEGORY.COMMON, 3000u);
                }
            }
            break;
        }

        case REWARD_TYPE.EQUIP_ITEM:
        {
            EquipItemTable.EquipItemData equipItemData = Singleton <EquipItemTable> .I.GetEquipItemData(itemId);

            if (equipItemData != null)
            {
                text = equipItemData.name;
                if (num > 1)
                {
                    text = num.ToString() + " " + text + " " + StringTable.Get(STRING_CATEGORY.COMMON, 3000u);
                }
            }
            break;
        }

        case REWARD_TYPE.SKILL_ITEM:
        {
            SkillItemTable.SkillItemData skillItemData = Singleton <SkillItemTable> .I.GetSkillItemData(itemId);

            if (skillItemData != null)
            {
                text = skillItemData.name;
                if (num > 1)
                {
                    text = num.ToString() + " " + text + " " + StringTable.Get(STRING_CATEGORY.COMMON, 3000u);
                }
            }
            break;
        }
        }
        return(text);
    }
    public override void UpdateUI()
    {
        bool flag = MonoBehaviourSingleton <GachaManager> .I.selectGacha.num == 1;

        SetActive((Enum)UI.OBJ_SINGLE_ROOT, flag);
        SetActive((Enum)UI.OBJ_MULTI_ROOT, !flag);
        SetActive((Enum)UI.OBJ_BG_SINGLE, flag);
        SetActive((Enum)UI.OBJ_BG_MULTI, !flag);
        if (flag)
        {
            string text     = string.Empty;
            int    star_num = 0;
            GachaResult.GachaReward   gachaReward = MonoBehaviourSingleton <GachaManager> .I.gachaResult.reward[0];
            QuestTable.QuestTableData questData   = Singleton <QuestTable> .I.GetQuestData((uint)gachaReward.itemId);

            if (questData != null)
            {
                text     = questData.questText;
                star_num = (int)questData.difficulty;
            }
            SetLabelText((Enum)UI.LBL_NAME, text);
            RARITY_TYPE[] array = (RARITY_TYPE[])Enum.GetValues(typeof(RARITY_TYPE));
            int           i     = 0;
            for (int num = array.Length; i < num; i++)
            {
                SetActive((Enum)rarityAnimRoot[i], questData.rarity == array[i]);
            }
            SetGachaQuestDifficulty(UI.OBJ_DIFFICULTY_ROOT, star_num);
            ResetTween((Enum)UI.OBJ_DIFFICULTY_ROOT, 0);
            ResetTween((Enum)rarityAnimRoot[(int)questData.rarity], 0);
            ResetTween((Enum)UI.OBJ_RARITY_TEXT_ROOT, 0);
            if (questData.rarity <= RARITY_TYPE.C)
            {
                ResetTween((Enum)UI.OBJ_RARITY_LIGHT, 0);
                PlayTween((Enum)UI.OBJ_RARITY_LIGHT, true, (EventDelegate.Callback)null, false, 0);
            }
            PlayTween((Enum)UI.OBJ_RARITY_TEXT_ROOT, true, (EventDelegate.Callback)null, false, 0);
            PlayTween((Enum)rarityAnimRoot[(int)questData.rarity], true, (EventDelegate.Callback) delegate
            {
                PlayTween((Enum)UI.OBJ_DIFFICULTY_ROOT, true, (EventDelegate.Callback)null, false, 0);
            }, false, 0);
            QuestGachaDirectorBase questGachaDirectorBase = AnimationDirector.I as QuestGachaDirectorBase;
            if (questGachaDirectorBase != null)
            {
                questGachaDirectorBase.PlayRarityAudio(questData.rarity, true);
                questGachaDirectorBase.PlayUIRarityEffect(questData.rarity, GetCtrl(UI.OBJ_RARITY_ROOT), GetCtrl(rarityAnimRoot[(int)questData.rarity]));
            }
        }
        else
        {
            int index = 0;
            MonoBehaviourSingleton <GachaManager> .I.gachaResult.reward.ForEach(delegate(GachaResult.GachaReward reward)
            {
                bool flag2 = false;
                int num3   = 0;
                QuestItemInfo questItem = MonoBehaviourSingleton <InventoryManager> .I.GetQuestItem((uint)reward.itemId);
                if (questItem != null)
                {
                    flag2 = GameSaveData.instance.IsNewItem(ITEM_ICON_TYPE.QUEST_ITEM, questItem.uniqueID);
                    flag2 = IsNewItemQuestEnemySpecies(questItem);
                    num3  = questItem.infoData.questData.tableData.GetMainEnemyLv();
                }
                bool is_new       = flag2;
                ItemIcon itemIcon = ItemIcon.CreateRewardItemIcon(REWARD_TYPE.QUEST_ITEM, (uint)reward.itemId, GetCtrl(iconRootAry[index]), -1, null, 0, is_new, -1, false, null, false, false, ItemIcon.QUEST_ICON_SIZE_TYPE.DEFAULT);
                itemIcon.SetEnableCollider(false);
                string text2 = string.Empty;
                if (num3 > 0)
                {
                    text2 = string.Format(StringTable.Get(STRING_CATEGORY.MAIN_STATUS, 1u), num3.ToString());
                }
                SetLabelText(GetCtrl(iconRootAry[index]), iconLevelAry[index], text2);
                SetEvent(GetCtrl(iconRootAry[index]), "QUEST_DETAIL", index);
                index++;
            });
        }
        int num2 = MonoBehaviourSingleton <UserInfoManager> .I.userStatus.crystal;

        if (MonoBehaviourSingleton <GachaManager> .I.selectGacha.requiredItemId > 0)
        {
            ItemTable.ItemData itemData = Singleton <ItemTable> .I.GetItemData((uint)MonoBehaviourSingleton <GachaManager> .I.selectGacha.requiredItemId);

            UITexture[] array2 = new UITexture[3]
            {
                FindCtrl(FindCtrl(footerRoot, UI.OBJ_GACHA_DISABLE_ROOT), UI.TEX_TICKET).GetComponent <UITexture>(),
                FindCtrl(FindCtrl(footerRoot, UI.OBJ_GACHA_ENABLE_ROOT), UI.TEX_TICKET).GetComponent <UITexture>(),
                FindCtrl(footerRoot, UI.TEX_TICKET_HAVE).GetComponent <UITexture>()
            };
            UITexture[] array3 = array2;
            foreach (UITexture ui_tex in array3)
            {
                ResourceLoad.LoadItemIconTexture(ui_tex, itemData.iconID);
            }
            num2 = MonoBehaviourSingleton <InventoryManager> .I.GetItemNum((ItemInfo x) => x.tableData.id == itemData.id, 1, false);

            if (MonoBehaviourSingleton <GachaManager> .I.gachaResult.counter >= 0)
            {
                SetActive(footerRoot, UI.GACHATICKETCOUNTERSRESULT, false);
                SetActive(footerRoot, UI.S_COUNTER, false);
                SetActive(footerRoot, UI.S_AVAILABLE, true);
            }
            else if (MonoBehaviourSingleton <GachaManager> .I.gachaResult.counter > 0)
            {
                SetActive(footerRoot, UI.GACHATICKETCOUNTERSRESULT, true);
                SetActive(footerRoot, UI.S_COUNTER, true);
                SetActive(footerRoot, UI.S_AVAILABLE, false);
                SetActive(footerRoot, UI.NUMBER_COUNTER_IMG, true);
                FindCtrl(footerRoot, UI.NUMBER_COUNTER_IMG).GetComponent <UISprite>().spriteName = MonoBehaviourSingleton <GachaManager> .I.gachaResult.counter.ToString();

                FindCtrl(FindCtrl(footerRoot, UI.GACHATICKETCOUNTERSRESULT), UI.COUNTER_PROGRESSBAR_FOREGROUND).GetComponent <UISprite>().fillAmount = (float)(10 - MonoBehaviourSingleton <GachaManager> .I.gachaResult.counter) / 10f;
                SetLabelText(footerRoot, UI.COUNTER_LBL, MonoBehaviourSingleton <GachaManager> .I.gachaResult.counter);
            }
            else
            {
                SetActive(footerRoot, UI.GACHATICKETCOUNTERSRESULT, true);
                SetActive(footerRoot, UI.S_COUNTER, false);
                SetActive(footerRoot, UI.S_AVAILABLE, true);
            }
        }
        SetActive(footerRoot, UI.SPR_CRYSTAL, MonoBehaviourSingleton <GachaManager> .I.selectGacha.requiredItemId == 0);
        SetActive(footerRoot, UI.TEX_TICKET_HAVE, MonoBehaviourSingleton <GachaManager> .I.selectGacha.requiredItemId > 0);
        SetLabelText(footerRoot, UI.LBL_CRYSTAL_NUM, num2.ToString());
        if (MonoBehaviourSingleton <GachaManager> .I.gachaResult.gachaGuaranteeCampaignInfo == null)
        {
            SetGachaButtonActive(!MonoBehaviourSingleton <GachaManager> .I.IsSelectTutorialGacha() && MonoBehaviourSingleton <GachaManager> .I.gachaResult.remainCount != 0);
        }
        else
        {
            SetGachaButtonActive(!MonoBehaviourSingleton <GachaManager> .I.IsSelectTutorialGacha());
        }
    }
Ejemplo n.º 25
0
    public override void UpdateUI()
    {
        bool flag = MonoBehaviourSingleton <GachaManager> .I.selectGacha.num == 1;

        SetActive((Enum)UI.OBJ_SINGLE_ROOT, flag);
        SetActive((Enum)UI.OBJ_MULTI_ROOT, !flag);
        if (flag)
        {
            GachaResult.GachaReward      gachaReward   = MonoBehaviourSingleton <GachaManager> .I.gachaResult.reward[0];
            SkillItemTable.SkillItemData skillItemData = Singleton <SkillItemTable> .I.GetSkillItemData((uint)gachaReward.itemId);

            if (skillItemData == null)
            {
                SetActive((Enum)UI.OBJ_SINGLE_ROOT, false);
            }
            SetLabelText((Enum)UI.LBL_NAME, skillItemData.name);
            SetLabelText((Enum)UI.LBL_ATK, skillItemData.baseAtk.ToString());
            SetLabelText((Enum)UI.LBL_DEF, skillItemData.baseDef.ToString());
            SetLabelText((Enum)UI.LBL_HP, skillItemData.baseHp.ToString());
            SetLabelText((Enum)UI.LBL_DESCRIPTION, skillItemData.GetExplanationText(1));
            SetRenderSkillItemModel((Enum)UI.TEX_MODEL, skillItemData.id, true, false);
            SetRenderSkillItemSymbolModel((Enum)UI.TEX_INNER_MODEL, skillItemData.id, true);
            RARITY_TYPE[] array = (RARITY_TYPE[])Enum.GetValues(typeof(RARITY_TYPE));
            int           i     = 0;
            for (int num = array.Length; i < num; i++)
            {
                SetActive((Enum)rarityAnimRoot[i], skillItemData.rarity == array[i]);
            }
            ResetTween((Enum)rarityAnimRoot[(int)skillItemData.rarity], 0);
            ResetTween((Enum)UI.OBJ_RARITY_TEXT_ROOT, 0);
            if (skillItemData.rarity <= RARITY_TYPE.C)
            {
                ResetTween((Enum)UI.OBJ_RARITY_LIGHT, 0);
                PlayTween((Enum)UI.OBJ_RARITY_LIGHT, true, (EventDelegate.Callback)null, false, 0);
            }
            PlayTween((Enum)rarityAnimRoot[(int)skillItemData.rarity], true, (EventDelegate.Callback)null, false, 0);
            PlayTween((Enum)UI.OBJ_RARITY_TEXT_ROOT, true, (EventDelegate.Callback)null, false, 0);
            if (AnimationDirector.I is SkillGachaDirector)
            {
                (AnimationDirector.I as SkillGachaDirector).PlayUIRarityEffect(skillItemData.rarity, GetCtrl(UI.OBJ_RARITY_ROOT), GetCtrl(rarityAnimRoot[(int)skillItemData.rarity]));
            }
        }
        else
        {
            int index = 0;
            MonoBehaviourSingleton <GachaManager> .I.gachaResult.reward.ForEach(delegate(GachaResult.GachaReward reward)
            {
                bool flag2     = false;
                Transform ctrl = GetCtrl(iconRootAry[index]);
                SkillItemTable.SkillItemData skillItemData2 = Singleton <SkillItemTable> .I.GetSkillItemData((uint)reward.itemId);
                if (skillItemData2 == null)
                {
                    SetActive(ctrl, false);
                }
                else
                {
                    SetActive(ctrl, true);
                    bool is_new       = flag2;
                    ItemIcon itemIcon = ItemIcon.CreateRewardItemIcon(REWARD_TYPE.SKILL_ITEM, (uint)reward.itemId, ctrl, -1, null, 0, is_new, -1, false, null, false, false, ItemIcon.QUEST_ICON_SIZE_TYPE.DEFAULT);
                    itemIcon.SetEnableCollider(false);
                    Transform ctrl2 = GetCtrl(magiNameAry[index]);
                    SetLabelText(ctrl2, skillItemData2.name);
                    SetEvent(GetCtrl(iconRootAry[index]), "SKILL_DETAIL", index);
                    index++;
                }
            });
        }
        int num2 = MonoBehaviourSingleton <UserInfoManager> .I.userStatus.crystal;

        if (MonoBehaviourSingleton <GachaManager> .I.selectGacha.requiredItemId > 0)
        {
            ItemTable.ItemData itemData = Singleton <ItemTable> .I.GetItemData((uint)MonoBehaviourSingleton <GachaManager> .I.selectGacha.requiredItemId);

            UITexture[] array2 = new UITexture[3]
            {
                FindCtrl(GetCtrl(UI.OBJ_GACHA_DISABLE_ROOT), UI.TEX_TICKET).GetComponent <UITexture>(),
                FindCtrl(GetCtrl(UI.OBJ_GACHA_ENABLE_ROOT), UI.TEX_TICKET).GetComponent <UITexture>(),
                GetCtrl(UI.TEX_TICKET_HAVE).GetComponent <UITexture>()
            };
            UITexture[] array3 = array2;
            foreach (UITexture ui_tex in array3)
            {
                ResourceLoad.LoadItemIconTexture(ui_tex, itemData.iconID);
            }
            num2 = MonoBehaviourSingleton <InventoryManager> .I.GetItemNum((ItemInfo x) => x.tableData.id == itemData.id, 1, false);
        }
        SetActive(footerRoot, UI.SPR_CRYSTAL, MonoBehaviourSingleton <GachaManager> .I.selectGacha.requiredItemId == 0);
        SetActive(footerRoot, UI.TEX_TICKET_HAVE, MonoBehaviourSingleton <GachaManager> .I.selectGacha.requiredItemId > 0);
        SetLabelText(footerRoot, UI.LBL_CRYSTAL_NUM, num2.ToString());
        SetGachaButtonActive(!MonoBehaviourSingleton <GachaManager> .I.IsSelectTutorialGacha() && MonoBehaviourSingleton <GachaManager> .I.gachaResult.remainCount != 0);
    }
Ejemplo n.º 26
0
    public override void UpdateUI()
    {
        SetLabelText((Enum)UI.STR_TITLE, StringTable.Get(STRING_CATEGORY.COMMON, 103u));
        SetLabelText((Enum)UI.STR_TITLE_REFLECT, StringTable.Get(STRING_CATEGORY.COMMON, 103u));
        List <ItemInfo> itemList = MonoBehaviourSingleton <InventoryManager> .I.GetItemList((ItemInfo x) => x.tableData.type == ITEM_TYPE.TICKET, 0);

        ExpiredItem[] showList = GetItemList(itemList).ToArray();
        GetCtrl(UI.LBL_CAUTION).GetComponent <UILabel>().supportEncoding = true;
        string text = StringTable.Get(STRING_CATEGORY.SHOP, 14u);

        SetLabelText((Enum)UI.LBL_CAUTION, text);
        SetActive((Enum)UI.BTN_TO_GACHA, MonoBehaviourSingleton <GameSceneManager> .I.GetCurrentSceneName() != "ShopScene");
        SetActive((Enum)UI.GRD_LIST, showList.Length > 0);
        SetActive((Enum)UI.STR_ORDER_NON_LIST, showList.Length == 0);
        SetActive((Enum)UI.OBJ_ACTIVE_ROOT, showList.Length > 0);
        SetActive((Enum)UI.OBJ_INACTIVE_ROOT, showList.Length == 0);
        if (showList.Length == 0)
        {
            SetLabelText((Enum)UI.LBL_MAX, "0");
            SetLabelText((Enum)UI.LBL_NOW, "0");
            UIScrollView component = GetCtrl(UI.SCR_LIST).GetComponent <UIScrollView>();
            if (component != null)
            {
                component.set_enabled(false);
                component.verticalScrollBar.alpha = 0f;
            }
        }
        else
        {
            pageMax = 1 + (showList.Length - 1) / 10;
            bool flag = pageMax > 1;
            SetActive((Enum)UI.OBJ_ACTIVE_ROOT, flag);
            SetActive((Enum)UI.OBJ_INACTIVE_ROOT, !flag);
            SetLabelText((Enum)UI.LBL_MAX, pageMax.ToString());
            SetLabelText((Enum)UI.LBL_NOW, nowPage.ToString());
            int           num   = 10 * (nowPage - 1);
            int           num2  = (nowPage != pageMax) ? 10 : (showList.Length - num);
            ExpiredItem[] array = new ExpiredItem[num2];
            Array.Copy(showList, num, array, 0, num2);
            showList = array;
            SetGrid(UI.GRD_LIST, "GachaTicketListItem", showList.Length, true, delegate(int i, Transform t, bool is_recycle)
            {
                ExpiredItem expiredItem     = showList[i];
                ItemTable.ItemData itemData = Singleton <ItemTable> .I.GetItemData((uint)expiredItem.itemId);
                UITexture component2        = FindCtrl(t, UI.TEX_ICON).GetComponent <UITexture>();
                ResourceLoad.LoadItemIconTexture(component2, itemData.iconID);
                SetLabelText(t, UI.LBL_NAME, itemData.name);
                string empty  = string.Empty;
                string empty2 = string.Empty;
                if (string.IsNullOrEmpty(expiredItem.expiredAt))
                {
                    empty  = "-";
                    empty2 = "-";
                }
                else
                {
                    empty  = expiredItem.expiredAt;
                    empty2 = TimeManager.GetRemainTimeToText(expiredItem.expiredAt, 1);
                }
                SetLabelText(t, UI.LBL_LIMIT, empty);
                SetLabelText(t, UI.LBL_COUNTDOWN, empty2);
            });
        }
    }
Ejemplo n.º 27
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);
    }
Ejemplo n.º 28
0
    private ItemIcon CreateItemIcon(SortCompareData dropItem, Transform o, string event_name, int i)
    {
        ITEM_ICON_TYPE iTEM_ICON_TYPE        = ITEM_ICON_TYPE.NONE;
        RARITY_TYPE?   rarity                = null;
        ELEMENT_TYPE   element               = ELEMENT_TYPE.MAX;
        EQUIPMENT_TYPE?magi_enable_icon_type = null;
        int            icon_id               = -1;
        int            num = -1;

        if (dropItem != null)
        {
            iTEM_ICON_TYPE        = dropItem.GetIconType();
            icon_id               = dropItem.GetIconID();
            rarity                = dropItem.GetRarity();
            element               = dropItem.GetIconElement();
            magi_enable_icon_type = dropItem.GetIconMagiEnableType();
            num = dropItem.GetNum();
            if (num == 1)
            {
                num = -1;
            }
        }
        bool is_new = false;

        switch (iTEM_ICON_TYPE)
        {
        case ITEM_ICON_TYPE.ITEM:
        case ITEM_ICON_TYPE.QUEST_ITEM:
        {
            ulong uniqID = dropItem.GetUniqID();
            if (uniqID != 0L)
            {
                is_new = MonoBehaviourSingleton <InventoryManager> .I.IsNewItem(iTEM_ICON_TYPE, dropItem.GetUniqID());
            }
            break;
        }

        default:
            is_new = true;
            break;

        case ITEM_ICON_TYPE.NONE:
            break;
        }
        int enemy_icon_id  = 0;
        int enemy_icon_id2 = 0;

        if (iTEM_ICON_TYPE == ITEM_ICON_TYPE.ITEM)
        {
            ItemTable.ItemData itemData = Singleton <ItemTable> .I.GetItemData(dropItem.GetTableID());

            enemy_icon_id  = itemData.enemyIconID;
            enemy_icon_id2 = itemData.enemyIconID2;
        }
        ItemIcon itemIcon = null;

        if (dropItem.GetIconType() == ITEM_ICON_TYPE.QUEST_ITEM)
        {
            ItemIcon.ItemIconCreateParam itemIconCreateParam = new ItemIcon.ItemIconCreateParam();
            itemIconCreateParam.icon_type = dropItem.GetIconType();
            itemIconCreateParam.icon_id   = dropItem.GetIconID();
            itemIconCreateParam.rarity    = dropItem.GetRarity();
            itemIconCreateParam.parent    = o;
            itemIconCreateParam.element   = dropItem.GetIconElement();
            itemIconCreateParam.magi_enable_equip_type = dropItem.GetIconMagiEnableType();
            itemIconCreateParam.num               = dropItem.GetNum();
            itemIconCreateParam.enemy_icon_id     = enemy_icon_id;
            itemIconCreateParam.enemy_icon_id2    = enemy_icon_id2;
            itemIconCreateParam.questIconSizeType = ItemIcon.QUEST_ICON_SIZE_TYPE.REWARD_DELIVERY_LIST;
            itemIcon = ItemIcon.Create(itemIconCreateParam);
        }
        else
        {
            GET_TYPE getType = dropItem.GetGetType();
            itemIcon = ItemIcon.Create(iTEM_ICON_TYPE, icon_id, rarity, o, element, magi_enable_icon_type, num, event_name, i, is_new, -1, false, null, false, enemy_icon_id, enemy_icon_id2, false, getType);
        }
        itemIcon.SetRewardBG(true);
        itemIcon.SetRewardCategoryInfo(dropItem.GetCategory());
        Transform ctrl = GetCtrl(UI.PNL_MATERIAL_INFO);

        MaterialInfoButton.Set(itemIcon.transform, material_info_t, dropItem.GetMaterialType(), dropItem.GetTableID(), base.sectionData.sectionName, ctrl);
        return(itemIcon);
    }
    private static UIDropAnnounce.COLOR GetColor(Coop_Model_EnemyDefeat model, List <InGameManager.DropDeliveryInfo> deliveryList)
    {
        UIDropAnnounce.COLOR cOLOR = UIDropAnnounce.COLOR.NORMAL;
        if (!model.dropLoungeShare)
        {
            switch (model.boxType)
            {
            case 1:
                return(UIDropAnnounce.COLOR.SP_N);

            case 2:
                return(UIDropAnnounce.COLOR.SP_HN);

            case 3:
                return(UIDropAnnounce.COLOR.SP_R);

            case 4:
                return(UIDropAnnounce.COLOR.HALLOWEEN);

            default:
            {
                int i = 0;
                for (int count = model.dropIds.Count; i < count; i++)
                {
                    if (cOLOR == UIDropAnnounce.COLOR.NORMAL)
                    {
                        switch (model.dropTypes[i])
                        {
                        case 5:
                            cOLOR = UIDropAnnounce.COLOR.RARE;
                            break;

                        case 4:
                        {
                            EquipItemTable.EquipItemData equipItemData = Singleton <EquipItemTable> .I.GetEquipItemData((uint)model.dropItemIds[i]);

                            if (equipItemData != null && GameDefine.IsRare(equipItemData.rarity))
                            {
                                cOLOR = UIDropAnnounce.COLOR.RARE;
                            }
                            break;
                        }

                        default:
                        {
                            ItemTable.ItemData itemData = Singleton <ItemTable> .I.GetItemData((uint)model.dropItemIds[i]);

                            if (itemData != null && GameDefine.IsRare(itemData.rarity))
                            {
                                cOLOR = UIDropAnnounce.COLOR.RARE;
                            }
                            break;
                        }
                        }
                    }
                }
                if (deliveryList.Count > 0 && cOLOR == UIDropAnnounce.COLOR.NORMAL)
                {
                    cOLOR = UIDropAnnounce.COLOR.DELIVERY;
                }
                return(cOLOR);
            }
            }
        }
        return(UIDropAnnounce.COLOR.LOUNGE);
    }
Ejemplo n.º 30
0
    public override void UpdateUI()
    {
        if (reward == null)
        {
            SetActive((Enum)UI.OBJ_FRAME, false);
        }
        else
        {
            SetFullScreenButton((Enum)UI.BTN_CENTER);
            SetActive((Enum)UI.OBJ_FRAME, true);
            SetLabelText((Enum)UI.LBL_GOLD, reward.money.ToString("N0"));
            SetLabelText((Enum)UI.LBL_CRYSTAL, reward.crystal.ToString("N0"));
            SetLabelText((Enum)UI.LBL_EXP, reward.exp.ToString("N0"));
            int          num  = (reward.crystal > 0) ? 1 : 0;
            int          num2 = reward.item.Count + reward.equipItem.Count + reward.skillItem.Count + num;
            int          num3 = num + reward.item.Count;
            int          num4 = num + reward.item.Count + reward.equipItem.Count;
            RewardData[] data = new RewardData[num2];
            int          j    = 0;
            for (int num5 = num2; j < num5; j++)
            {
                data[j] = default(RewardData);
                if (j < num)
                {
                    data[j].reward_type            = REWARD_TYPE.CRYSTAL;
                    data[j].icon_type              = ITEM_ICON_TYPE.NONE;
                    data[j].icon_id                = 1;
                    data[j].item_id                = 0u;
                    data[j].rarity                 = null;
                    data[j].element                = ELEMENT_TYPE.MAX;
                    data[j].magi_enable_equip_type = null;
                    data[j].num            = reward.crystal;
                    data[j].enemy_icon_id  = 0;
                    data[j].enemy_icon_id2 = 0;
                    data[j].getType        = GET_TYPE.PAY;
                }
                else if (j < num3)
                {
                    int index = j - num;
                    QuestCompleteReward.Item item     = reward.item[index];
                    ItemTable.ItemData       itemData = Singleton <ItemTable> .I.GetItemData((uint)item.itemId);

                    data[j].reward_type            = REWARD_TYPE.ITEM;
                    data[j].icon_type              = ItemIcon.GetItemIconType(itemData.type);
                    data[j].icon_id                = itemData.iconID;
                    data[j].item_id                = itemData.id;
                    data[j].rarity                 = itemData.rarity;
                    data[j].element                = ELEMENT_TYPE.MAX;
                    data[j].magi_enable_equip_type = null;
                    data[j].num            = item.num;
                    data[j].enemy_icon_id  = itemData.enemyIconID;
                    data[j].enemy_icon_id2 = itemData.enemyIconID2;
                    data[j].getType        = GET_TYPE.PAY;
                }
                else if (j < num4)
                {
                    int index2 = j - num3;
                    QuestCompleteReward.EquipItem equipItem     = reward.equipItem[index2];
                    EquipItemTable.EquipItemData  equipItemData = Singleton <EquipItemTable> .I.GetEquipItemData((uint)equipItem.equipItemId);

                    data[j].reward_type            = REWARD_TYPE.EQUIP_ITEM;
                    data[j].icon_type              = ItemIcon.GetItemIconType(equipItemData.type);
                    data[j].icon_id                = equipItemData.GetIconID(MonoBehaviourSingleton <UserInfoManager> .I.userStatus.sex);
                    data[j].item_id                = equipItemData.id;
                    data[j].rarity                 = equipItemData.rarity;
                    data[j].element                = equipItemData.GetTargetElementPriorityToTable();
                    data[j].magi_enable_equip_type = null;
                    data[j].num            = ((equipItem.num != 1) ? equipItem.num : (-1));
                    data[j].enemy_icon_id  = 0;
                    data[j].enemy_icon_id2 = 0;
                    data[j].getType        = equipItemData.getType;
                }
                else
                {
                    int index3 = j - num4;
                    QuestCompleteReward.SkillItem skillItem     = reward.skillItem[index3];
                    SkillItemTable.SkillItemData  skillItemData = Singleton <SkillItemTable> .I.GetSkillItemData((uint)skillItem.skillItemId);

                    data[j].reward_type            = REWARD_TYPE.SKILL_ITEM;
                    data[j].icon_type              = ItemIcon.GetItemIconType(skillItemData.type);
                    data[j].icon_id                = skillItemData.iconID;
                    data[j].item_id                = skillItemData.id;
                    data[j].rarity                 = skillItemData.rarity;
                    data[j].element                = ELEMENT_TYPE.MAX;
                    data[j].magi_enable_equip_type = skillItemData.GetEnableEquipType();
                    data[j].num            = ((skillItem.num != 1) ? skillItem.num : (-1));
                    data[j].enemy_icon_id  = 0;
                    data[j].enemy_icon_id2 = 0;
                    data[j].getType        = GET_TYPE.PAY;
                }
            }
            SetGrid(UI.GRD_ICON, string.Empty, num2, false, delegate(int i, Transform t, bool is_recycle)
            {
                ItemIcon itemIcon = ItemIcon.Create(data[i].icon_type, data[i].icon_id, data[i].rarity, t, data[i].element, data[i].magi_enable_equip_type, data[i].num, "REWARD", i, false, -1, false, null, false, data[i].enemy_icon_id, data[i].enemy_icon_id2, false, data[i].getType);
                SetMaterialInfo(itemIcon.transform, data[i].reward_type, data[i].item_id, null);
            });
        }
    }