public override void Set(object[] data = null)
    {
        base.Set(null);
        QuestSortData questSortData = data[0] as QuestSortData;
        bool          flag          = (bool)data[1];

        QuestTable.QuestTableData tableData = questSortData.itemData.infoData.questData.tableData;
        SetName(tableData.questText);
        SetVisibleBG(true);
        if (flag)
        {
            infoRootAry[0].SetActive(true);
            infoRootAry[1].SetActive(false);
            lblNum.text = questSortData.GetNum().ToString();
        }
        else
        {
            infoRootAry[0].SetActive(false);
            infoRootAry[1].SetActive(true);
            lblDifficulty.text = ((int)(tableData.difficulty + 1)).ToString();
            lblEnemyName.text  = Singleton <EnemyTable> .I.GetEnemyData((uint)tableData.GetMainEnemyID()).name;
        }
    }
Esempio n. 2
0
    public void OnRecvNotifyEncounterBoss(int fromClientId, Coop_Model_RoomNotifyEncounterBoss model)
    {
        if (!QuestManager.IsValidInGameExplore() || !MonoBehaviourSingleton <QuestManager> .I.IsExploreBossMap())
        {
            if (!MonoBehaviourSingleton <QuestManager> .I.IsEncountered() && MonoBehaviourSingleton <InGameProgress> .IsValid() && MonoBehaviourSingleton <InGameProgress> .I.progressEndType == InGameProgress.PROGRESS_END_TYPE.NONE)
            {
                CoopClient coopClient = clients.FindByClientId(fromClientId);
                MonoBehaviourSingleton <QuestManager> .I.SetMemberEncounteredMap(model.mid);

                uint currentQuestID = MonoBehaviourSingleton <QuestManager> .I.currentQuestID;
                QuestTable.QuestTableData questData = Singleton <QuestTable> .I.GetQuestData(currentQuestID);

                int    mainEnemyID = questData.GetMainEnemyID();
                string enemyName   = Singleton <EnemyTable> .I.GetEnemyName((uint)mainEnemyID);

                string text = StringTable.Format(STRING_CATEGORY.IN_GAME, 8000u, coopClient.GetPlayerName(), enemyName);
                UIInGamePopupDialog.PushOpen(text, false, 1.22f);
            }
            if (QuestManager.IsValidExplore())
            {
                MonoBehaviourSingleton <QuestManager> .I.UpdatePortalUsedFlag(model.pid);
            }
        }
    }
    public override void UpdateUI()
    {
        SetActive((Enum)UI.OBJ_CLEAR_REWARD, true);
        base.UpdateUI();
        questTableData = info.GetQuestData();
        if (questTableData != null)
        {
            EnemyTable.EnemyData enemyData = Singleton <EnemyTable> .I.GetEnemyData((uint)questTableData.GetMainEnemyID());

            if (enemyData != null)
            {
                SetLabelText((Enum)UI.LBL_ENEMY_NAME, enemyData.name);
                ItemIcon itemIcon = ItemIcon.Create(ITEM_ICON_TYPE.QUEST_ITEM, enemyData.iconId, null, GetCtrl(UI.OBJ_ENEMY), ELEMENT_TYPE.MAX, null, -1, null, 0, false, -1, false, null, false, 0, 0, false, GET_TYPE.PAY);
                itemIcon.SetDepth(7);
                SetElementSprite((Enum)UI.SPR_ENM_ELEMENT, (int)enemyData.element);
                SetElementSprite((Enum)UI.SPR_WEAK_ELEMENT, (int)enemyData.weakElement);
                SetActive((Enum)UI.STR_NON_WEAK_ELEMENT, enemyData.weakElement == ELEMENT_TYPE.MAX);
                int num = (int)questTableData.limitTime;
                SetLabelText((Enum)UI.LBL_LIMIT_TIME, $"{num / 60:D2}:{num % 60:D2}");
                if ((base.isComplete || isNotice) && !isCompletedEventDelivery)
                {
                    SetActive((Enum)UI.BTN_CREATE_OFF, false);
                }
                else
                {
                    SetActive((Enum)UI.BTN_CREATE, IsCreatableRoom());
                    SetActive((Enum)UI.BTN_CREATE_OFF, !IsCreatableRoom());
                }
                SetSprite(baseRoot, UI.SPR_WINDOW, "RequestWindowBase_Explorer");
                SetSprite(baseRoot, UI.SPR_MESSAGE_BG, "Checkhukidashi_Explorer");
                SetActive(baseRoot, UI.OBJ_COMPLETE_ROOT, base.isComplete);
            }
        }
    }
Esempio n. 4
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;
        }
    }
Esempio n. 5
0
    private void SetUpEnemy(Transform t, QuestTable.QuestTableData quest)
    {
        EnemyTable.EnemyData enemyData = Singleton <EnemyTable> .I.GetEnemyData((uint)quest.GetMainEnemyID());

        if (enemyData != null)
        {
            ClearStatusQuest clearStatusQuestData = MonoBehaviourSingleton <QuestManager> .I.GetClearStatusQuestData(quest.questID);

            bool   flag    = clearStatusQuestData != null;
            int    icon_id = 10999;
            string text    = "?????";
            string text2   = "??";
            if (flag)
            {
                icon_id = enemyData.iconId;
                text    = enemyData.name;
                text2   = quest.GetMainEnemyLv().ToString();
            }
            ItemIcon itemIcon = ItemIcon.Create(ITEM_ICON_TYPE.QUEST_ITEM, icon_id, null, FindCtrl(t, UI.OBJ_ENEMY), ELEMENT_TYPE.MAX, null, -1, null, 0, false, -1, false, null, false, 0, 0, false, GET_TYPE.PAY);
            itemIcon.SetDepth(7);
            SetElementSprite(t, UI.SPR_ENM_ELEMENT, (int)enemyData.element);
            SetActive(t, UI.SPR_ENM_ELEMENT, flag);
            SetElementSprite(t, UI.SPR_WEAK_ELEMENT, (int)enemyData.weakElement);
            SetActive(t, UI.SPR_WEAK_ELEMENT, flag);
            bool flag2 = enemyData.weakElement == ELEMENT_TYPE.MAX;
            SetActive(t, UI.STR_NON_WEAK_ELEMENT, flag2 && flag);
            SetActive(t, UI.STR_UNKNOWN_WEAK_ELEMENT, !flag);
            SetLabelText(t, UI.LBL_MONSTER_NAME, text);
            SetLabelText(t, UI.LBL_MONSTER_LEVEL, StringTable.Format(STRING_CATEGORY.MAIN_STATUS, 1u, text2));
        }
    }
Esempio n. 6
0
    private IEnumerator DoQuestGacha()
    {
        Init();
        int display_rarity = 0;

        SetLinkCamera(true);
        int enemy_id = 0;

        EnemyTable.EnemyData enemy_data = null;
        if (MonoBehaviourSingleton <GachaManager> .I.gachaResult != null)
        {
            GachaResult.GachaReward reward       = MonoBehaviourSingleton <GachaManager> .I.gachaResult.reward[0];
            uint reward_quest_id                 = (uint)reward.itemId;
            QuestTable.QuestTableData quest_data = Singleton <QuestTable> .I.GetQuestData(reward_quest_id);

            if (quest_data != null)
            {
                enemy_data = Singleton <EnemyTable> .I.GetEnemyData((uint)quest_data.GetMainEnemyID());
            }
        }
        if (enemy_data == null)
        {
            if (enemy_id == 0)
            {
                enemy_id = 1101001;
            }
            enemy_data = Singleton <EnemyTable> .I.GetEnemyData((uint)enemy_id);
        }
        NPCLoader   npc_loader   = LoadNPC();
        EnemyLoader enemy_loader = null;

        if (enemy_data != null)
        {
            int displayAnimID = enemy_data.animId;
            OutGameSettingsManager.EnemyDisplayInfo displayInfo = MonoBehaviourSingleton <OutGameSettingsManager> .I.SearchEnemyDisplayInfoForGacha(enemy_data);

            int   modelID      = enemy_data.modelId;
            float displayScale = enemy_data.modelScale;
            if (displayInfo != null)
            {
                displayAnimID = displayInfo.animID;
                displayScale  = displayInfo.gachaScale;
            }
            enemy_loader = LoadEnemy(enemyPosition, modelID, displayAnimID, displayScale, enemy_data.baseEffectName, enemy_data.baseEffectNode);
            while (enemy_loader.isLoading)
            {
                yield return((object)null);
            }
            enemy_loader.ApplyGachaDisplayScaleToParentNode();
            CheckAndReplaceShader(enemy_loader);
            enemy_loader.get_gameObject().SetActive(false);
        }
        while (npc_loader.isLoading)
        {
            yield return((object)null);
        }
        LoadingQueue lo_queue = new LoadingQueue(this);

        CacheAudio(lo_queue);
        if (enemy_data != null)
        {
            CacheEnemyAudio(enemy_data, lo_queue);
        }
        while (lo_queue.IsLoading())
        {
            yield return((object)null);
        }
        PlayerAnimCtrl npc_anim = PlayerAnimCtrl.Get(npc_loader.animator, PLCA.IDLE_01, null, null, null);

        CreateNPCEffect(npc_loader.model);
        yield return((object)null);

        stageAnimator.set_cullingMode(0);
        stageAnimator.Rebind();
        targetRarity = MonoBehaviourSingleton <GachaManager> .I.GetMaxRarity().ToRarityExpressionID() + 1;

        if (targetRarity > 4)
        {
            targetRarity = 4;
        }
        stageAnimator.Play("StageAnim_Main");
        Play("MainAnim_Start", null, 0f);
        PlayEffect(startEffectPrefabs[0]);
        npc_anim.Play(PLCA.QUEST_GACHA, true);
        bool rankup3 = UpdateDisplayRarity(ref display_rarity);

        PlayAudio(AUDIO.OPENING_01);
        while (Step(0.5f))
        {
            yield return((object)null);
        }
        PlayAudio(AUDIO.OPENING_02);
        PlayAudio(AUDIO.OPENING_03);
        while (Step(1.4f))
        {
            yield return((object)null);
        }
        PlayAudio(AUDIO.OPENING_04);
        while (Step(2.6f))
        {
            yield return((object)null);
        }
        PlayAudio(AUDIO.DOOR_01);
        while (Step(3.2f))
        {
            yield return((object)null);
        }
        PlayAudio(AUDIO.DOOR_02);
        while (Step(3.38f))
        {
            yield return((object)null);
        }
        PlayAudio(AUDIO.MAGI_INTRO_01);
        while (Step(6.5f))
        {
            yield return((object)null);
        }
        npc_loader.get_gameObject().SetActive(false);
        PlayMeteorEffect(display_rarity);
        PlayAudio(AUDIO.METEOR_01);
        while (Step(7.5f))
        {
            yield return((object)null);
        }
        PlayMagicEffect(display_rarity, rankup3);
        PlayMagicAudio(display_rarity);
        rankup3 = UpdateDisplayRarity(ref display_rarity);
        PlayMeteorEffect(display_rarity);
        while (Step(8.5f))
        {
            yield return((object)null);
        }
        PlayMagicEffect(display_rarity, rankup3);
        PlayMagicAudio(display_rarity);
        rankup3 = UpdateDisplayRarity(ref display_rarity);
        PlayMeteorEffect(display_rarity);
        PlayAudio(AUDIO.METEOR_02);
        while (Step(9.5f))
        {
            yield return((object)null);
        }
        PlayMagicEffect(display_rarity, rankup3);
        PlayMagicAudio(display_rarity);
        while (Step(10.5f))
        {
            yield return((object)null);
        }
        if (enemy_loader != null)
        {
            enemy_loader.get_gameObject().SetActive(true);
        }
        if (!skip)
        {
            PlayEnemyAnimation(enemy_loader, "Base Layer.GACHA_SINGLE");
        }
        Play("MainAnim_End", null, 0f);
        UpdateDisplayRarity(ref display_rarity);
        PlayEndEffect(display_rarity);
        RARITY_TYPE rarity = MonoBehaviourSingleton <GachaManager> .I.GetMaxRarity();

        PlayAppearAudio(rarity, false);
        if (enemy_data != null)
        {
            PlayEnemyAudio(enemy_data, false);
        }
        while (Step(11.5f))
        {
            yield return((object)null);
        }
        while (Step(13f))
        {
            yield return((object)null);
        }
        if (skip)
        {
            while (MonoBehaviourSingleton <TransitionManager> .I.isChanging)
            {
                yield return((object)null);
            }
            PlayEnemyAnimation(enemy_loader, "Base Layer.IDLE");
            Time.set_timeScale(1f);
            if (MonoBehaviourSingleton <TransitionManager> .I.isTransing)
            {
                yield return((object)MonoBehaviourSingleton <TransitionManager> .I.In());
            }
        }
        else
        {
            skip = true;
        }
        Time.set_timeScale(1f);
        sectionCommandReceiver.OnEnd();
    }
Esempio n. 7
0
    private void InitEnemyItem(int i, Transform t, bool isRecycle, QuestTable.QuestTableData questData)
    {
        EnemyTable.EnemyData enemyData = Singleton <EnemyTable> .I.GetEnemyData((uint)questData.GetMainEnemyID());

        if (enemyData != null)
        {
            SetLabelText(t, UI.LBL_ENEMY_LEVEL, StringTable.Format(STRING_CATEGORY.MAIN_STATUS, 1u, arenaData.level));
            SetLabelText(t, UI.LBL_ENEMY_NAME, enemyData.name);
            ItemIcon itemIcon = ItemIcon.Create(ItemIcon.GetItemIconType(questData.questType), enemyData.iconId, questData.rarity, FindCtrl(t, UI.OBJ_ENEMY), enemyData.element, null, -1, null, 0, false, -1, false, null, false, 0, 0, false, GET_TYPE.PAY);
            itemIcon.SetEnableCollider(false);
            SetActive(t, UI.SPR_ELEMENT_ROOT, enemyData.element != ELEMENT_TYPE.MAX);
            SetElementSprite(t, UI.SPR_ELEMENT, (int)enemyData.element);
            SetElementSprite(t, UI.SPR_WEAK_ELEMENT, (int)enemyData.weakElement);
            SetActive(t, UI.STR_NON_WEAK_ELEMENT, enemyData.weakElement == ELEMENT_TYPE.MAX);
        }
    }
Esempio n. 8
0
    private void InitQuestButton(GuildRequestItem item, int index, Transform parent)
    {
        QuestTable.QuestTableData questData = Singleton <QuestTable> .I.GetQuestData((uint)item.questId);

        EnemyTable.EnemyData enemyData = Singleton <EnemyTable> .I.GetEnemyData((uint)questData.GetMainEnemyID());

        ItemIcon itemIcon = ItemIcon.Create(ITEM_ICON_TYPE.QUEST_ITEM, enemyData.iconId, questData.rarity, FindCtrl(parent, UI.OBJ_ENEMY), enemyData.element, null, -1, null, 0, false, -1, false, null, false, 0, 0, false, GET_TYPE.PAY);

        itemIcon.SetEnableCollider(false);
        SetLabelText(parent, UI.LBL_QUEST_NAME, questData.questText);
    }
    public override void UpdateUI()
    {
        base.UpdateUI();
        QuestTable.QuestTableData questData = info.GetQuestData();
        if (questData != null)
        {
            EnemyTable.EnemyData enemyData = Singleton <EnemyTable> .I.GetEnemyData((uint)questData.GetMainEnemyID());

            if (enemyData != null)
            {
                SetLabelText((Enum)UI.LBL_ENEMY_NAME, enemyData.name);
                ItemIcon itemIcon = ItemIcon.Create(ITEM_ICON_TYPE.QUEST_ITEM, enemyData.iconId, null, GetCtrl(UI.OBJ_ENEMY), ELEMENT_TYPE.MAX, null, -1, null, 0, false, -1, false, null, false, 0, 0, false, GET_TYPE.PAY);
                itemIcon.SetDepth(7);
                SetElementSprite((Enum)UI.SPR_ENM_ELEMENT, (int)enemyData.element);
                SetElementSprite((Enum)UI.SPR_WEAK_ELEMENT, (int)enemyData.weakElement);
                SetActive((Enum)UI.STR_NON_WEAK_ELEMENT, enemyData.weakElement == ELEMENT_TYPE.MAX);
            }
        }
    }
Esempio n. 10
0
    private void SetDropItemIcon(SortCompareData[] dropItemList, Transform t_grid, int wave)
    {
        if (dropItemList != null)
        {
            string text = string.Format(StringTable.Get(STRING_CATEGORY.RUSH_WAVE, 10004400u), wave);
            SetLabelText(t_grid, UI.LBL_DROP_ITEM_WAVE, text);
            QuestTable.QuestTableData questData = Singleton <QuestTable> .I.GetQuestData((uint)MonoBehaviourSingleton <InGameManager> .I.GetRushQuestId(wave));

            string text2 = "Lv" + questData.GetMainEnemyLv().ToString() + Singleton <EnemyTable> .I.GetEnemyName((uint)questData.GetMainEnemyID());

            SetLabelText(t_grid, UI.LBL_BOSS_NAME, text2);
            SetGrid(t_grid, UI.GRD_DROP_ITEM, null, dropItemList.Length, true, delegate(int i, Transform o, bool is_recycle)
            {
                ItemIcon icon = null;
                if (i < dropItemList.Length)
                {
                    icon = CreateItemIcon(dropItemList[i], o, "DROP", i);
                }
                Transform val = SetPrefab(o, "QuestResultDropIconOpener", true);
                QuestResultDropIconOpener.Info info2 = new QuestResultDropIconOpener.Info
                {
                    IsRare   = ResultUtility.IsRare(dropItemList[i]),
                    IsBroken = ResultUtility.IsBreakReward(dropItemList[i])
                };
                val.GetComponent <QuestResultDropIconOpener>().Initialized(icon, 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(UI.OBJ_SCROLL_VIEW), t, ui_effect_name);
                });
            });
        }
    }
    protected void UpdateHappenTarget()
    {
        QuestTable.QuestTableData questData = info.GetQuestData();
        if (questData != null)
        {
            EnemyTable.EnemyData enemyData = Singleton <EnemyTable> .I.GetEnemyData((uint)questData.GetMainEnemyID());

            if (enemyData != null)
            {
                ItemIcon.Create(ITEM_ICON_TYPE.QUEST_ITEM, enemyData.iconId, null, FindCtrl(targetFrame, UI.OBJ_ENEMY), enemyData.element, null, -1, null, 0, false, -1, false, null, false, 0, 0, false, GET_TYPE.PAY);
            }
        }
    }
    public override void UpdateUI()
    {
        //IL_017c: Unknown result type (might be due to invalid IL or missing references)
        Desc desc = GameSection.GetEventData() as Desc;

        if (desc != null)
        {
            QuestTable.QuestTableData questData = desc.questData;
            if (questData != null)
            {
                EnemyTable.EnemyData enemyData = Singleton <EnemyTable> .I.GetEnemyData((uint)questData.GetMainEnemyID());

                if (enemyData != null)
                {
                    int mainEnemyLv = questData.GetMainEnemyLv();
                    SetLabelText((Enum)UI.LBL_NAME, enemyData.name);
                    SetLabelText((Enum)UI.NUM_LV, mainEnemyLv.ToString());
                    SetElementSprite((Enum)UI.STR_ELEM, (int)enemyData.weakElement);
                    if (enemyData.weakElement != ELEMENT_TYPE.MAX)
                    {
                        SetActive((Enum)UI.STR_WEAK_NONE, false);
                    }
                    int num  = (int)(questData.limitTime / 60f);
                    int num2 = (int)(questData.limitTime % 60f);
                    SetLabelText((Enum)UI.NUM_TIMER, $"{num:D2}:{num2:D2}");
                    UI[] array = new UI[10]
                    {
                        UI.OBJ_DIFFICULT_STAR_1,
                        UI.OBJ_DIFFICULT_STAR_2,
                        UI.OBJ_DIFFICULT_STAR_3,
                        UI.OBJ_DIFFICULT_STAR_4,
                        UI.OBJ_DIFFICULT_STAR_5,
                        UI.OBJ_DIFFICULT_STAR_6,
                        UI.OBJ_DIFFICULT_STAR_7,
                        UI.OBJ_DIFFICULT_STAR_8,
                        UI.OBJ_DIFFICULT_STAR_9,
                        UI.OBJ_DIFFICULT_STAR_10
                    };
                    int num3 = (int)(questData.difficulty + 1);
                    int i    = 0;
                    for (int num4 = array.Length; i < num4; i++)
                    {
                        SetActive((Enum)array[i], i < num3);
                    }
                    PlayTween((Enum)UI.TWN_DIFFICULT_STAR, true, (EventDelegate.Callback)null, false, 0);
                    QuestInfoData.Mission[] array2 = QuestInfoData.CreateMissionData(questData);
                    if (array2 != null)
                    {
                        GetCtrl(UI.MISSION).get_gameObject().SetActive(true);
                        UI[] array3 = new UI[3]
                        {
                            UI.MISSION_LABEL_01,
                            UI.MISSION_LABEL_02,
                            UI.MISSION_LABEL_03
                        };
                        UI[] array4 = new UI[3]
                        {
                            UI.MISSION_CROWN_ON_01,
                            UI.MISSION_CROWN_ON_02,
                            UI.MISSION_CROWN_ON_03
                        };
                        UI[] array5 = new UI[3]
                        {
                            UI.MISSION_CROWN_OFF_01,
                            UI.MISSION_CROWN_OFF_02,
                            UI.MISSION_CROWN_OFF_03
                        };
                        int num5 = Mathf.Min(array2.Length, 3);
                        for (int j = 0; j < num5; j++)
                        {
                            QuestInfoData.Mission mission = array2[j];
                            SetActive((Enum)array4[j], CLEAR_STATUS.CLEAR == mission.state);
                            SetActive((Enum)array5[j], CLEAR_STATUS.CLEAR != mission.state);
                            SetLabelText((Enum)array3[j], mission.tableData.missionText);
                        }
                    }
                    if (desc.reward != null)
                    {
                        Array.Sort(desc.reward, (QuestInfoData.Quest.Reward l, QuestInfoData.Quest.Reward r) => l.priority - r.priority);
                    }
                    SetFontStyle((Enum)UI.LBL_NAME, 2);
                    SetFontStyle((Enum)UI.NUM_LV, 2);
                    SetFontStyle((Enum)UI.LBL_LV, 2);
                    countAnimStep = 0;
                    timeLimit     = MonoBehaviourSingleton <InGameSettingsManager> .I.happenQuestDirection.confirmUITime;
                    prevTime      = -1;
                    isAnswer      = false;
                    Update();
                    UpdateAnchors();
                    PlayTween((Enum)UI.OBJ_FRAME, true, (EventDelegate.Callback)null, true, 0);
                    PlayTween((Enum)UI.COUNT_ANIM_0, true, (EventDelegate.Callback)null, false, 0);
                }
            }
        }
    }
Esempio n. 13
0
    private void SetQuestData(QuestTable.QuestTableData questData, Transform t)
    {
        //IL_0257: Unknown result type (might be due to invalid IL or missing references)
        //IL_0264: Unknown result type (might be due to invalid IL or missing references)
        //IL_0279: Unknown result type (might be due to invalid IL or missing references)
        //IL_02ff: Unknown result type (might be due to invalid IL or missing references)
        //IL_030c: Unknown result type (might be due to invalid IL or missing references)
        //IL_0319: Unknown result type (might be due to invalid IL or missing references)
        UI[] array = new UI[10]
        {
            UI.OBJ_DIFFICULT_STAR_1,
            UI.OBJ_DIFFICULT_STAR_2,
            UI.OBJ_DIFFICULT_STAR_3,
            UI.OBJ_DIFFICULT_STAR_4,
            UI.OBJ_DIFFICULT_STAR_5,
            UI.OBJ_DIFFICULT_STAR_6,
            UI.OBJ_DIFFICULT_STAR_7,
            UI.OBJ_DIFFICULT_STAR_8,
            UI.OBJ_DIFFICULT_STAR_9,
            UI.OBJ_DIFFICULT_STAR_10
        };
        int num = (int)(questData.difficulty + 1);
        int i   = 0;

        for (int num2 = array.Length; i < num2; i++)
        {
            SetActive(t, array[i], i < num);
        }
        ResetTween(t, UI.TWN_DIFFICULT_STAR, 0);
        PlayTween(t, UI.TWN_DIFFICULT_STAR, true, null, false, 0);
        EnemyTable.EnemyData enemyData = Singleton <EnemyTable> .I.GetEnemyData((uint)questData.GetMainEnemyID());

        if (enemyData != null)
        {
            SetActive(t, UI.OBJ_ENEMY, true);
            int         iconId   = enemyData.iconId;
            RARITY_TYPE?rarity   = (questData.questType != QUEST_TYPE.ORDER) ? null : new RARITY_TYPE?(questData.rarity);
            ItemIcon    itemIcon = ItemIcon.Create(ITEM_ICON_TYPE.QUEST_ITEM, iconId, rarity, FindCtrl(t, UI.OBJ_ENEMY), enemyData.element, null, -1, null, 0, false, -1, false, null, false, 0, 0, false, GET_TYPE.PAY);
            itemIcon.SetEnableCollider(false);
            SetActive(t, UI.SPR_ELEMENT_ROOT, enemyData.element != ELEMENT_TYPE.MAX);
            SetElementSprite(t, UI.SPR_ELEMENT, (int)enemyData.element);
            SetElementSprite(t, UI.SPR_WEAK_ELEMENT, (int)enemyData.weakElement);
            SetActive(t, UI.STR_NON_WEAK_ELEMENT, enemyData.weakElement == ELEMENT_TYPE.MAX);
        }
        else
        {
            SetActive(t, UI.OBJ_ENEMY, false);
            SetElementSprite(t, UI.SPR_WEAK_ELEMENT, 6);
            SetActive(t, UI.STR_NON_WEAK_ELEMENT, true);
        }
        Transform val  = FindCtrl(t, UI.SPR_ICON_DOUBLE);
        Transform val2 = FindCtrl(t, UI.SPR_ICON_DEFENSE_BATTLE);
        Transform val3 = FindCtrl(t, UI.LBL_RECRUTING_MEMBERS);
        Transform val4 = FindCtrl(t, UI.SPR_WINDOW_BASE);

        if (val4 != null)
        {
            UISprite  component  = val4.GetComponent <UISprite>();
            Transform val5       = FindCtrl(t, UI.OBJ_SEARCH_INFO_ROOT);
            UISprite  component2 = val5.GetComponent <UISprite>();
            if (questData.questType == QUEST_TYPE.GATE || questData.questType == QUEST_TYPE.DEFENSE)
            {
                component.spriteName  = "QuestListPlateO";
                component2.spriteName = "SearchAdWindowO";
                val.get_gameObject().SetActive(true);
                val2.get_gameObject().SetActive(questData.questType == QUEST_TYPE.DEFENSE);
                val3.get_gameObject().SetActive(questData.questType == QUEST_TYPE.DEFENSE);
                string format = StringTable.Get(STRING_CATEGORY.GATE_QUEST_NAME, 0u);
                string text   = string.Empty;
                if (enemyData != null)
                {
                    text = string.Format(format, questData.GetMainEnemyLv(), enemyData.name);
                }
                SetLabelText(t, UI.LBL_QUEST_NAME, text);
                SetLabelText(t, UI.LBL_QUEST_NUM, string.Empty);
            }
            else
            {
                component.spriteName  = "QuestListPlateN";
                component2.spriteName = "SearchAdWindow";
                val.get_gameObject().SetActive(false);
                val2.get_gameObject().SetActive(false);
                val3.get_gameObject().SetActive(false);
                SetLabelText(t, UI.LBL_QUEST_NAME, questData.questText);
                SetLabelText(t, UI.LBL_QUEST_NUM, string.Format(base.sectionData.GetText("QUEST_NUMBER"), questData.locationNumber, questData.questNumber));
            }
        }
        else
        {
            SetLabelText(t, UI.LBL_QUEST_NAME, questData.questText);
            SetLabelText(t, UI.LBL_QUEST_NUM, string.Format(base.sectionData.GetText("QUEST_NUMBER"), questData.locationNumber, questData.questNumber));
        }
    }
    protected void ShowChallenge()
    {
        //IL_0071: Unknown result type (might be due to invalid IL or missing references)
        List <QuestData> challengeList = MonoBehaviourSingleton <QuestManager> .I.challengeList;

        if (MonoBehaviourSingleton <PartyManager> .I.challengeInfo.oldShadowCount != null)
        {
            SetActive((Enum)UI.STR_CHALLENGE_BONUS_MESSAGE, true);
            SetActive((Enum)UI.BTN_DETAIL, true);
            UIPanel component = GetCtrl(UI.SCR_ORDER_QUEST).GetComponent <UIPanel>();
            component.baseClipRegion = new Vector4(0f, -110f, 440f, 549f);
            SetLabelText((Enum)UI.STR_CHALLENGE_BONUS_MESSAGE, StringTable.Format(STRING_CATEGORY.SHADOW_COUNT, 3u, MonoBehaviourSingleton <PartyManager> .I.challengeInfo.oldShadowCount.num));
            base.GetComponent <UILabel>((Enum)UI.STR_CHALLENGE_BONUS_MESSAGE).supportEncoding = true;
        }
        else
        {
            SetActive((Enum)UI.STR_CHALLENGE_BONUS_MESSAGE, false);
            SetActive((Enum)UI.BTN_DETAIL, false);
        }
        SetLabelText((Enum)UI.STR_CHALLENGE_MESSAGE, MonoBehaviourSingleton <PartyManager> .I.challengeInfo.message);
        SetSupportEncoding(UI.STR_CHALLENGE_MESSAGE, true);
        if (challengeList == null || challengeList.Count == 0)
        {
            SetActive((Enum)UI.GRD_ORDER_QUEST, false);
            SetActive((Enum)UI.STR_ORDER_NON_LIST, true);
            SetActive((Enum)UI.OBJ_ACTIVE_ROOT, false);
            SetActive((Enum)UI.OBJ_INACTIVE_ROOT, true);
            SetLabelText((Enum)UI.LBL_MAX, "0");
            SetLabelText((Enum)UI.LBL_NOW, "0");
            UIScrollView component2 = GetCtrl(UI.SCR_ORDER_QUEST).GetComponent <UIScrollView>();
            if (component2 != null)
            {
                component2.set_enabled(false);
                component2.verticalScrollBar.alpha = 0f;
            }
        }
        else
        {
            SetActive((Enum)UI.GRD_ORDER_QUEST, true);
            SetActive((Enum)UI.STR_ORDER_NON_LIST, false);
            pageMax = 1 + (challengeList.Count - 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());
            UITweener[] transitions = GetCtrl(UI.OBJ_FRAME).GetComponents <UITweener>();
            int         finishCount = 0;
            UITweener[] array       = transitions;
            foreach (UITweener uITweener in array)
            {
                uITweener.AddOnFinished(delegate
                {
                    finishCount++;
                    if (finishCount >= transitions.Length)
                    {
                        isTransitionFinished = true;
                    }
                });
            }
            int num  = 10 * (nowPage - 1);
            int num2 = (nowPage != pageMax) ? 10 : (challengeList.Count - num);
            challengeData = new QuestData[num2];
            Array.Copy(challengeList.ToArray(), num, challengeData, 0, num2);
            bool isGuildRequest = MonoBehaviourSingleton <GameSceneManager> .I.GetCurrentSectionName() == "GuildRequestChallengeCounter";

            UIScrollView scrollView = GetCtrl(UI.SCR_ORDER_QUEST).GetComponent <UIScrollView>();
            SetGrid(UI.GRD_ORDER_QUEST, "QuestListChallengeItem", challengeData.Length, isResetUI, (int i, Transform t) => Realizes("QuestListChallengeItem", t, true), delegate(int i, Transform t, bool is_recycle)
            {
                //IL_02f4: Unknown result type (might be due to invalid IL or missing references)
                //IL_0319: Unknown result type (might be due to invalid IL or missing references)
                SetActive(t, true);
                SetEvent(t, "SELECT_ORDER", i);
                QuestTable.QuestTableData questData = Singleton <QuestTable> .I.GetQuestData((uint)challengeData[i].questId);
                if (isGuildRequest)
                {
                    SetActive(t, UI.TWN_DIFFICULT_STAR, false);
                    SetActive(t, UI.TXT_NEED_POINT, true);
                    string text = string.Format(StringTable.Get(STRING_CATEGORY.GUILD_REQUEST, 6u), MonoBehaviourSingleton <GuildRequestManager> .I.GetNeedPoint(questData.rarity), MonoBehaviourSingleton <GuildRequestManager> .I.GetNeedTimeWithFormat(questData.rarity));
                    SetLabelText(t, UI.TXT_NEED_POINT, text);
                }
                else
                {
                    SetActive(t, UI.TWN_DIFFICULT_STAR, false);
                    SetActive(t, UI.TXT_NEED_POINT, false);
                }
                EnemyTable.EnemyData enemyData = Singleton <EnemyTable> .I.GetEnemyData((uint)questData.GetMainEnemyID());
                ITEM_ICON_TYPE itemIconType    = ItemIcon.GetItemIconType(questData.questType);
                ItemIcon icon = ItemIcon.Create(itemIconType, enemyData.iconId, questData.rarity, FindCtrl(t, UI.OBJ_ENEMY), enemyData.element, null, -1, null, 0, false, -1, false, null, false, 0, 0, false, GET_TYPE.PAY);
                icon.SetEnableCollider(false);
                SetActive(t, UI.SPR_ELEMENT_ROOT, enemyData.element != ELEMENT_TYPE.MAX);
                SetElementSprite(t, UI.SPR_ELEMENT, (int)enemyData.element);
                SetElementSprite(t, UI.SPR_WEAK_ELEMENT, (int)enemyData.weakElement);
                SetActive(t, UI.STR_NON_WEAK_ELEMENT, enemyData.weakElement == ELEMENT_TYPE.MAX);
                SetLabelText(t, UI.LBL_QUEST_NAME, questData.questText);
                int num3 = 1;
                ClearStatusQuestEnemySpecies clearStatusQuestEnemySpecies = MonoBehaviourSingleton <QuestManager> .I.GetClearStatusQuestEnemySpecies(questData.questID);
                if (clearStatusQuestEnemySpecies != null)
                {
                    num3 = clearStatusQuestEnemySpecies.questStatus;
                }
                int value = i + 100;
                SetToggleGroup(t, UI.OBJ_ICON_NEW, value);
                CLEAR_STATUS cLEAR_STATUS = (CLEAR_STATUS)num3;
                if (cLEAR_STATUS != CLEAR_STATUS.NEW)
                {
                    SetToggle(t, UI.OBJ_ICON_NEW, false);
                    SetActive(t, UI.OBJ_ICON_ROOT, false);
                }
                else
                {
                    SetActive(t, UI.OBJ_ICON_ROOT, true);
                    SetToggle(t, UI.OBJ_ICON_NEW, true);
                    SetVisibleWidgetEffect(UI.SCR_ORDER_QUEST, t, UI.SPR_ICON_NEW, "ef_ui_questselect_new");
                }
                Transform val = FindCtrl(t, UI.OBJ_FRAME);
                if (val != null)
                {
                    UIPanel uiPanel = val.get_gameObject().GetComponent <UIPanel>();
                    if (uiPanel == null)
                    {
                        uiPanel       = val.get_gameObject().AddComponent <UIPanel>();
                        uiPanel.depth = scrollView.panel.depth + 1;
                    }
                    uiPanel.widgetsAreStatic = false;
                    if (isScrollViewReady)
                    {
                        PanelToStatic(icon, uiPanel);
                    }
                    else
                    {
                        QuestChallengeSelect questChallengeSelect = this;
                        questChallengeSelect.onScrollViewReady    = (Action)Delegate.Combine(questChallengeSelect.onScrollViewReady, (Action) delegate
                        {
                            PanelToStatic(icon, uiPanel);
                        });
                    }
                }
            });
        }
    }
        public bool IsMatchElement(QuestItemInfo item)
        {
            QuestTable.QuestTableData tableData = item.infoData.questData.tableData;
            EnemyTable.EnemyData      enemyData = Singleton <EnemyTable> .I.GetEnemyData((uint)tableData.GetMainEnemyID());

            for (int i = 0; i < elementButton.Length; i++)
            {
                int num = i;
                if ((elementBit & (1 << num)) > 0 && enemyData.element == (ELEMENT_TYPE)num)
                {
                    return(true);
                }
            }
            return(false);
        }