コード例 #1
0
 public static void AddWorldQuest(MobileWorldQuest worldQuest)
 {
     if (!WorldQuestData.instance.m_worldQuestDictionary.ContainsKey(worldQuest.QuestID))
     {
         WorldQuestData.instance.m_worldQuestDictionary.Add(worldQuest.QuestID, worldQuest);
     }
 }
コード例 #2
0
    private void InitRewardInfoDisplay(MobileWorldQuest worldQuest)
    {
        int num = 0;

        this.m_rewardInfo[0].gameObject.SetActive(true);
        this.m_rewardInfo[1].gameObject.SetActive(false);
        this.m_rewardInfo[2].gameObject.SetActive(false);
        if (worldQuest.Item != null && worldQuest.Item.Count <MobileWorldQuestReward>() > 0)
        {
            foreach (MobileWorldQuestReward mobileWorldQuestReward in worldQuest.Item)
            {
                Sprite rewardSprite = GeneralHelpers.LoadIconAsset(AssetBundleType.Icons, mobileWorldQuestReward.FileDataID);
                this.m_rewardInfo[num].SetReward(MissionRewardDisplay.RewardType.item, mobileWorldQuestReward.RecordID, mobileWorldQuestReward.Quantity, rewardSprite, mobileWorldQuestReward.ItemContext);
                this.EnableAdditionalRewardDisplays(num++);
                if (num >= 3)
                {
                    return;
                }
            }
        }
        else if (worldQuest.Currency.Count <MobileWorldQuestReward>() > 0)
        {
            foreach (MobileWorldQuestReward mobileWorldQuestReward2 in worldQuest.Currency)
            {
                Sprite           iconSprite = GeneralHelpers.LoadCurrencyIcon(mobileWorldQuestReward2.RecordID);
                CurrencyTypesRec record     = StaticDB.currencyTypesDB.GetRecord(mobileWorldQuestReward2.RecordID);
                int quantity = mobileWorldQuestReward2.Quantity / (((record.Flags & 8u) == 0u) ? 1 : 100);
                this.m_rewardInfo[num].SetCurrency(mobileWorldQuestReward2.RecordID, quantity, iconSprite);
                this.EnableAdditionalRewardDisplays(num++);
                if (num >= 3)
                {
                    return;
                }
            }
        }
        else if (worldQuest.Money > 0)
        {
            Sprite iconSprite2 = Resources.Load <Sprite>("MiscIcons/INV_Misc_Coin_01");
            this.m_rewardInfo[num].SetGold(worldQuest.Money / 10000, iconSprite2);
            this.EnableAdditionalRewardDisplays(num++);
            if (num >= 3)
            {
                return;
            }
        }
        else if (worldQuest.Experience > 0)
        {
            Sprite localizedFollowerXpIcon = GeneralHelpers.GetLocalizedFollowerXpIcon();
            this.m_rewardInfo[num].SetFollowerXP(worldQuest.Experience, localizedFollowerXpIcon);
            this.EnableAdditionalRewardDisplays(num++);
            if (num >= 3)
            {
                return;
            }
        }
    }
コード例 #3
0
 public static void InitWorldQuestRewards(MobileWorldQuest worldQuest, GameObject prefab, Transform parent)
 {
     if (worldQuest.Item != null)
     {
         MobileWorldQuestReward[] item = worldQuest.Item;
         for (int i = 0; i < item.Length; i++)
         {
             MobileWorldQuestReward mobileWorldQuestReward = item[i];
             GameObject             gameObject             = Object.Instantiate <GameObject>(prefab);
             gameObject.get_transform().SetParent(parent, false);
             MissionRewardDisplay component = gameObject.GetComponent <MissionRewardDisplay>();
             component.InitReward(MissionRewardDisplay.RewardType.item, mobileWorldQuestReward.RecordID, mobileWorldQuestReward.Quantity, mobileWorldQuestReward.ItemContext, mobileWorldQuestReward.FileDataID);
         }
     }
     if (worldQuest.Money > 0)
     {
         GameObject gameObject2 = Object.Instantiate <GameObject>(prefab);
         gameObject2.get_transform().SetParent(parent, false);
         MissionRewardDisplay component2 = gameObject2.GetComponent <MissionRewardDisplay>();
         component2.InitReward(MissionRewardDisplay.RewardType.gold, 0, worldQuest.Money / 10000, 0, 0);
     }
     if (worldQuest.Experience > 0)
     {
         GameObject gameObject3 = Object.Instantiate <GameObject>(prefab);
         gameObject3.get_transform().SetParent(parent, false);
         MissionRewardDisplay component3 = gameObject3.GetComponent <MissionRewardDisplay>();
         component3.InitReward(MissionRewardDisplay.RewardType.followerXP, 0, worldQuest.Experience, 0, 0);
     }
     MobileWorldQuestReward[] currency = worldQuest.Currency;
     for (int j = 0; j < currency.Length; j++)
     {
         MobileWorldQuestReward mobileWorldQuestReward2 = currency[j];
         GameObject             gameObject4             = Object.Instantiate <GameObject>(prefab);
         gameObject4.get_transform().SetParent(parent, false);
         MissionRewardDisplay component4 = gameObject4.GetComponent <MissionRewardDisplay>();
         CurrencyTypesRec     record     = StaticDB.currencyTypesDB.GetRecord(mobileWorldQuestReward2.RecordID);
         if (record != null)
         {
             int rewardQuantity = mobileWorldQuestReward2.Quantity / (((record.Flags & 8u) == 0u) ? 1 : 100);
             component4.InitReward(MissionRewardDisplay.RewardType.currency, mobileWorldQuestReward2.RecordID, rewardQuantity, 0, 0);
         }
         else
         {
             Debug.LogWarning(string.Concat(new object[]
             {
                 "WORLD QUEST ",
                 worldQuest.QuestID,
                 " has bogus currency reward (id ",
                 mobileWorldQuestReward2.RecordID,
                 ")"
             }));
         }
     }
 }
コード例 #4
0
 private void MobileClientWorldQuestUpdateHandler(MobileClientWorldQuestUpdate msg)
 {
     WorldQuestData.ClearData();
     MobileWorldQuest[] quest = msg.Quest;
     for (int i = 0; i < quest.Length; i++)
     {
         MobileWorldQuest mobileWorldQuest = quest[i];
         if (mobileWorldQuest.StartLocationMapID == 1220)
         {
             WorldQuestData.AddWorldQuest(mobileWorldQuest);
         }
     }
     this.allPanels.adventureMapPanel.UpdateWorldQuests();
 }
コード例 #5
0
    private void SetupWorldQuestIcon(MobileWorldQuest worldQuest, GameObject worldQuestObj, float mapOffsetX, float mapOffsetY, float mapScale)
    {
        float num  = (float)worldQuest.StartLocationY * -mapScale;
        float num2 = (float)worldQuest.StartLocationX * mapScale;

        num  += mapOffsetX;
        num2 += mapOffsetY;
        float         num3      = (float)((worldQuest.StartLocationMapID != 1220) ? 2001 : 1201);
        float         num4      = 1334f;
        Vector2       vector    = new Vector3(num / num3, num2 / num4);
        RectTransform component = worldQuestObj.GetComponent <RectTransform>();

        component.anchorMin        = vector;
        component.anchorMax        = vector;
        component.anchoredPosition = Vector2.zero;
    }
コード例 #6
0
 private void InitRewardInfoDisplay(MobileWorldQuest worldQuest)
 {
     if (worldQuest.Item != null && Enumerable.Count <MobileWorldQuestReward>(worldQuest.Item) > 0)
     {
         MobileWorldQuestReward[] item = worldQuest.Item;
         int num = 0;
         if (num < item.Length)
         {
             MobileWorldQuestReward mobileWorldQuestReward = item[num];
             Sprite rewardSprite = GeneralHelpers.LoadIconAsset(AssetBundleType.Icons, mobileWorldQuestReward.FileDataID);
             this.m_rewardInfo.SetReward(MissionRewardDisplay.RewardType.item, mobileWorldQuestReward.RecordID, mobileWorldQuestReward.Quantity, rewardSprite, mobileWorldQuestReward.ItemContext);
         }
     }
     else if (worldQuest.Money > 0)
     {
         Sprite iconSprite = Resources.Load <Sprite>("MiscIcons/INV_Misc_Coin_01");
         this.m_rewardInfo.SetGold(worldQuest.Money / 10000, iconSprite);
     }
     else if (worldQuest.Experience > 0)
     {
         Sprite localizedFollowerXpIcon = GeneralHelpers.GetLocalizedFollowerXpIcon();
         this.m_rewardInfo.SetFollowerXP(worldQuest.Experience, localizedFollowerXpIcon);
     }
     else
     {
         MobileWorldQuestReward[] currency = worldQuest.Currency;
         int num2 = 0;
         if (num2 < currency.Length)
         {
             MobileWorldQuestReward mobileWorldQuestReward2 = currency[num2];
             Sprite           iconSprite2 = GeneralHelpers.LoadCurrencyIcon(mobileWorldQuestReward2.RecordID);
             CurrencyTypesRec record      = StaticDB.currencyTypesDB.GetRecord(mobileWorldQuestReward2.RecordID);
             int quantity = mobileWorldQuestReward2.Quantity / (((record.Flags & 8u) == 0u) ? 1 : 100);
             this.m_rewardInfo.SetCurrency(mobileWorldQuestReward2.RecordID, quantity, iconSprite2);
         }
     }
 }
コード例 #7
0
    public void SetQuest(int questID)
    {
        this.m_expiringSoon.get_gameObject().SetActive(false);
        this.m_questID = questID;
        Transform[] componentsInChildren = this.m_worldQuestObjectiveRoot.GetComponentsInChildren <Transform>(true);
        Transform[] array = componentsInChildren;
        for (int i = 0; i < array.Length; i++)
        {
            Transform transform = array[i];
            if (transform != null && transform != this.m_worldQuestObjectiveRoot.get_transform())
            {
                Object.DestroyImmediate(transform.get_gameObject());
            }
        }
        MobileWorldQuest mobileWorldQuest = (MobileWorldQuest)WorldQuestData.worldQuestDictionary.get_Item(this.m_questID);

        this.m_worldQuestNameText.set_text(mobileWorldQuest.QuestTitle);
        using (IEnumerator <MobileWorldQuestObjective> enumerator = Enumerable.AsEnumerable <MobileWorldQuestObjective>(mobileWorldQuest.Objective).GetEnumerator())
        {
            while (enumerator.MoveNext())
            {
                MobileWorldQuestObjective current = enumerator.get_Current();
                GameObject gameObject             = Object.Instantiate <GameObject>(this.m_worldQuestObjectiveDisplayPrefab);
                gameObject.get_transform().SetParent(this.m_worldQuestObjectiveRoot.get_transform(), false);
                Text component = gameObject.GetComponent <Text>();
                component.set_text("-" + current.Text);
            }
        }
        this.InitRewardInfoDisplay(mobileWorldQuest);
        this.m_endTime = (long)(mobileWorldQuest.EndTime - 900);
        QuestInfoRec record = StaticDB.questInfoDB.GetRecord(mobileWorldQuest.QuestInfoID);

        if (record == null)
        {
            return;
        }
        bool active = (record.Modifiers & 2) != 0;

        this.m_dragonFrame.get_gameObject().SetActive(active);
        this.m_background.set_sprite(Resources.Load <Sprite>("NewWorldQuest/Mobile-NormalQuest"));
        bool flag = (record.Modifiers & 1) != 0;

        if (flag && record.Type != 3)
        {
            this.m_background.set_sprite(Resources.Load <Sprite>("NewWorldQuest/Mobile-RareQuest"));
        }
        bool flag2 = (record.Modifiers & 4) != 0;

        if (flag2 && record.Type != 3)
        {
            this.m_background.set_sprite(Resources.Load <Sprite>("NewWorldQuest/Mobile-EpicQuest"));
        }
        int    uITextureAtlasMemberID;
        string text;

        switch (record.Type)
        {
        case 1:
        {
            int profession = record.Profession;
            switch (profession)
            {
            case 182:
                uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-herbalism");
                text = "Mobile-Herbalism";
                goto IL_46E;

            case 183:
            case 184:
IL_259:
                if (profession == 164)
                {
                    uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-blacksmithing");
                    text = "Mobile-Blacksmithing";
                    goto IL_46E;
                }
                if (profession == 165)
                {
                    uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-leatherworking");
                    text = "Mobile-Leatherworking";
                    goto IL_46E;
                }
                if (profession == 129)
                {
                    uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-firstaid");
                    text = "Mobile-FirstAid";
                    goto IL_46E;
                }
                if (profession == 171)
                {
                    uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-alchemy");
                    text = "Mobile-Alchemy";
                    goto IL_46E;
                }
                if (profession == 197)
                {
                    uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-tailoring");
                    text = "Mobile-Tailoring";
                    goto IL_46E;
                }
                if (profession == 202)
                {
                    uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-engineering");
                    text = "Mobile-Engineering";
                    goto IL_46E;
                }
                if (profession == 333)
                {
                    uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-enchanting");
                    text = "Mobile-Enchanting";
                    goto IL_46E;
                }
                if (profession == 356)
                {
                    uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-fishing");
                    text = "Mobile-Fishing";
                    goto IL_46E;
                }
                if (profession == 393)
                {
                    uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-skinning");
                    text = "Mobile-Skinning";
                    goto IL_46E;
                }
                if (profession == 755)
                {
                    uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-jewelcrafting");
                    text = "Mobile-Jewelcrafting";
                    goto IL_46E;
                }
                if (profession == 773)
                {
                    uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-inscription");
                    text = "Mobile-Inscription";
                    goto IL_46E;
                }
                if (profession != 794)
                {
                    uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-questmarker-questbang");
                    text = "Mobile-QuestExclamationIcon";
                    goto IL_46E;
                }
                uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-archaeology");
                text = "Mobile-Archaeology";
                goto IL_46E;

            case 185:
                uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-cooking");
                text = "Mobile-Cooking";
                goto IL_46E;

            case 186:
                uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-mining");
                text = "Mobile-Mining";
                goto IL_46E;
            }
            goto IL_259;
IL_46E:
            goto IL_4BB;
        }

        case 3:
            uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-pvp-ffa");
            text = "Mobile-PVP";
            goto IL_4BB;

        case 4:
            uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-petbattle");
            text = "Mobile-Pets";
            goto IL_4BB;
        }
        uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-questmarker-questbang");
        text = "Mobile-QuestExclamationIcon";
IL_4BB:
        if (text != null)
        {
            this.m_main.set_sprite(Resources.Load <Sprite>("NewWorldQuest/" + text));
        }
        else if (uITextureAtlasMemberID > 0)
        {
            this.m_main.set_sprite(TextureAtlas.instance.GetAtlasSprite(uITextureAtlasMemberID));
            this.m_main.SetNativeSize();
        }
        this.UpdateTimeRemaining();
    }
コード例 #8
0
    public void UpdateWorldQuests()
    {
        AdventureMapWorldQuest[] componentsInChildren = this.m_missionAndWordQuestArea.GetComponentsInChildren <AdventureMapWorldQuest>(true);
        AdventureMapWorldQuest[] array = componentsInChildren;
        for (int i = 0; i < array.Length; i++)
        {
            AdventureMapWorldQuest adventureMapWorldQuest = array[i];
            Object.DestroyImmediate(adventureMapWorldQuest.get_gameObject());
        }
        IEnumerator enumerator = WorldQuestData.worldQuestDictionary.get_Values().GetEnumerator();

        try
        {
            while (enumerator.MoveNext())
            {
                MobileWorldQuest mobileWorldQuest = (MobileWorldQuest)enumerator.get_Current();
                if (!this.IsFilterEnabled(MapFilterType.All))
                {
                    bool matchesFilter = false;
                    if (this.IsFilterEnabled(MapFilterType.ArtifactPower))
                    {
                        MobileWorldQuestReward[] item = mobileWorldQuest.Item;
                        for (int j = 0; j < item.Length; j++)
                        {
                            MobileWorldQuestReward mobileWorldQuestReward = item[j];
                            StaticDB.itemEffectDB.EnumRecordsByParentID(mobileWorldQuestReward.RecordID, delegate(ItemEffectRec itemEffectRec)
                            {
                                StaticDB.spellEffectDB.EnumRecordsByParentID(itemEffectRec.SpellID, delegate(SpellEffectRec spellEffectRec)
                                {
                                    if (spellEffectRec.Effect == 240)
                                    {
                                        matchesFilter = true;
                                        return(false);
                                    }
                                    return(true);
                                });
                                return(!matchesFilter);
                            });
                        }
                    }
                    if (this.IsFilterEnabled(MapFilterType.OrderResources))
                    {
                        MobileWorldQuestReward[] currency = mobileWorldQuest.Currency;
                        for (int k = 0; k < currency.Length; k++)
                        {
                            MobileWorldQuestReward mobileWorldQuestReward2 = currency[k];
                            if (mobileWorldQuestReward2.RecordID == 1220)
                            {
                                matchesFilter = true;
                                break;
                            }
                        }
                    }
                    if (this.IsFilterEnabled(MapFilterType.Gold) && mobileWorldQuest.Money > 0)
                    {
                        matchesFilter = true;
                    }
                    if (this.IsFilterEnabled(MapFilterType.Gear))
                    {
                        MobileWorldQuestReward[] item2 = mobileWorldQuest.Item;
                        for (int l = 0; l < item2.Length; l++)
                        {
                            MobileWorldQuestReward mobileWorldQuestReward3 = item2[l];
                            ItemRec record = StaticDB.itemDB.GetRecord(mobileWorldQuestReward3.RecordID);
                            if (record != null && (record.ClassID == 2 || record.ClassID == 3 || record.ClassID == 4 || record.ClassID == 6))
                            {
                                matchesFilter = true;
                                break;
                            }
                        }
                    }
                    if (this.IsFilterEnabled(MapFilterType.ProfessionMats))
                    {
                        MobileWorldQuestReward[] item3 = mobileWorldQuest.Item;
                        for (int m = 0; m < item3.Length; m++)
                        {
                            MobileWorldQuestReward mobileWorldQuestReward4 = item3[m];
                            ItemRec record2 = StaticDB.itemDB.GetRecord(mobileWorldQuestReward4.RecordID);
                            if (record2 != null && record2.ClassID == 7)
                            {
                                matchesFilter = true;
                                break;
                            }
                        }
                    }
                    if (this.IsFilterEnabled(MapFilterType.PetCharms))
                    {
                        MobileWorldQuestReward[] item4 = mobileWorldQuest.Item;
                        for (int n = 0; n < item4.Length; n++)
                        {
                            MobileWorldQuestReward mobileWorldQuestReward5 = item4[n];
                            if (mobileWorldQuestReward5.RecordID == 116415)
                            {
                                matchesFilter = true;
                                break;
                            }
                        }
                    }
                    if (this.IsFilterEnabled(MapFilterType.Bounty_HighmountainTribes) && PersistentBountyData.bountiesByWorldQuestDictionary.ContainsKey(mobileWorldQuest.QuestID))
                    {
                        MobileBountiesByWorldQuest mobileBountiesByWorldQuest = (MobileBountiesByWorldQuest)PersistentBountyData.bountiesByWorldQuestDictionary.get_Item(mobileWorldQuest.QuestID);
                        for (int num = 0; num < mobileBountiesByWorldQuest.BountyQuestID.Length; num++)
                        {
                            if (mobileBountiesByWorldQuest.BountyQuestID[num] == 42233)
                            {
                                matchesFilter = true;
                                break;
                            }
                        }
                    }
                    if (this.IsFilterEnabled(MapFilterType.Bounty_CourtOfFarondis) && PersistentBountyData.bountiesByWorldQuestDictionary.ContainsKey(mobileWorldQuest.QuestID))
                    {
                        MobileBountiesByWorldQuest mobileBountiesByWorldQuest2 = (MobileBountiesByWorldQuest)PersistentBountyData.bountiesByWorldQuestDictionary.get_Item(mobileWorldQuest.QuestID);
                        for (int num2 = 0; num2 < mobileBountiesByWorldQuest2.BountyQuestID.Length; num2++)
                        {
                            if (mobileBountiesByWorldQuest2.BountyQuestID[num2] == 42420)
                            {
                                matchesFilter = true;
                                break;
                            }
                        }
                    }
                    if (this.IsFilterEnabled(MapFilterType.Bounty_Dreamweavers) && PersistentBountyData.bountiesByWorldQuestDictionary.ContainsKey(mobileWorldQuest.QuestID))
                    {
                        MobileBountiesByWorldQuest mobileBountiesByWorldQuest3 = (MobileBountiesByWorldQuest)PersistentBountyData.bountiesByWorldQuestDictionary.get_Item(mobileWorldQuest.QuestID);
                        for (int num3 = 0; num3 < mobileBountiesByWorldQuest3.BountyQuestID.Length; num3++)
                        {
                            if (mobileBountiesByWorldQuest3.BountyQuestID[num3] == 42170)
                            {
                                matchesFilter = true;
                                break;
                            }
                        }
                    }
                    if (this.IsFilterEnabled(MapFilterType.Bounty_Wardens) && PersistentBountyData.bountiesByWorldQuestDictionary.ContainsKey(mobileWorldQuest.QuestID))
                    {
                        MobileBountiesByWorldQuest mobileBountiesByWorldQuest4 = (MobileBountiesByWorldQuest)PersistentBountyData.bountiesByWorldQuestDictionary.get_Item(mobileWorldQuest.QuestID);
                        for (int num4 = 0; num4 < mobileBountiesByWorldQuest4.BountyQuestID.Length; num4++)
                        {
                            if (mobileBountiesByWorldQuest4.BountyQuestID[num4] == 42422)
                            {
                                matchesFilter = true;
                                break;
                            }
                        }
                    }
                    if (this.IsFilterEnabled(MapFilterType.Bounty_Nightfallen) && PersistentBountyData.bountiesByWorldQuestDictionary.ContainsKey(mobileWorldQuest.QuestID))
                    {
                        MobileBountiesByWorldQuest mobileBountiesByWorldQuest5 = (MobileBountiesByWorldQuest)PersistentBountyData.bountiesByWorldQuestDictionary.get_Item(mobileWorldQuest.QuestID);
                        for (int num5 = 0; num5 < mobileBountiesByWorldQuest5.BountyQuestID.Length; num5++)
                        {
                            if (mobileBountiesByWorldQuest5.BountyQuestID[num5] == 42421)
                            {
                                matchesFilter = true;
                                break;
                            }
                        }
                    }
                    if (this.IsFilterEnabled(MapFilterType.Bounty_Valarjar) && PersistentBountyData.bountiesByWorldQuestDictionary.ContainsKey(mobileWorldQuest.QuestID))
                    {
                        MobileBountiesByWorldQuest mobileBountiesByWorldQuest6 = (MobileBountiesByWorldQuest)PersistentBountyData.bountiesByWorldQuestDictionary.get_Item(mobileWorldQuest.QuestID);
                        for (int num6 = 0; num6 < mobileBountiesByWorldQuest6.BountyQuestID.Length; num6++)
                        {
                            if (mobileBountiesByWorldQuest6.BountyQuestID[num6] == 42234)
                            {
                                matchesFilter = true;
                                break;
                            }
                        }
                    }
                    if (this.IsFilterEnabled(MapFilterType.Bounty_KirinTor) && PersistentBountyData.bountiesByWorldQuestDictionary.ContainsKey(mobileWorldQuest.QuestID))
                    {
                        MobileBountiesByWorldQuest mobileBountiesByWorldQuest7 = (MobileBountiesByWorldQuest)PersistentBountyData.bountiesByWorldQuestDictionary.get_Item(mobileWorldQuest.QuestID);
                        for (int num7 = 0; num7 < mobileBountiesByWorldQuest7.BountyQuestID.Length; num7++)
                        {
                            if (mobileBountiesByWorldQuest7.BountyQuestID[num7] == 43179)
                            {
                                matchesFilter = true;
                                break;
                            }
                        }
                    }
                    if (!matchesFilter)
                    {
                        continue;
                    }
                }
                GameObject gameObject = Object.Instantiate <GameObject>(AdventureMapPanel.instance.m_AdvMapWorldQuestPrefab);
                gameObject.get_transform().SetParent(this.m_missionAndWordQuestArea.get_transform(), false);
                float num8  = 0.10271506f;
                float num9  = (float)mobileWorldQuest.StartLocationY * -num8;
                float num10 = (float)mobileWorldQuest.StartLocationX * num8;
                float num11 = 1036.88037f;
                float num12 = 597.2115f;
                num9  += num11;
                num10 += num12;
                float         width     = this.m_worldMapLowDetail.get_sprite().get_textureRect().get_width();
                float         height    = this.m_worldMapLowDetail.get_sprite().get_textureRect().get_height();
                Vector2       vector    = new Vector3(num9 / width, num10 / height);
                RectTransform component = gameObject.GetComponent <RectTransform>();
                component.set_anchorMin(vector);
                component.set_anchorMax(vector);
                component.set_anchoredPosition(Vector2.get_zero());
                AdventureMapWorldQuest component2 = gameObject.GetComponent <AdventureMapWorldQuest>();
                component2.SetQuestID(mobileWorldQuest.QuestID);
                StackableMapIcon component3 = gameObject.GetComponent <StackableMapIcon>();
                if (component3 != null)
                {
                    component3.RegisterWithManager();
                }
            }
        }
        finally
        {
            IDisposable disposable = enumerator as IDisposable;
            if (disposable != null)
            {
                disposable.Dispose();
            }
        }
    }
コード例 #9
0
    public void UpdateWorldQuests()
    {
        AdventureMapWorldQuest[] componentsInChildren = this.m_missionAndWorldQuestArea_BrokenIsles.GetComponentsInChildren <AdventureMapWorldQuest>(true);
        foreach (AdventureMapWorldQuest adventureMapWorldQuest in componentsInChildren)
        {
            StackableMapIcon component  = adventureMapWorldQuest.GetComponent <StackableMapIcon>();
            GameObject       gameObject = adventureMapWorldQuest.gameObject;
            if (component != null)
            {
                component.RemoveFromContainer();
            }
            if (gameObject != null)
            {
                Object.DestroyImmediate(adventureMapWorldQuest.gameObject);
            }
        }
        componentsInChildren = this.m_missionAndWorldQuestArea_Argus.GetComponentsInChildren <AdventureMapWorldQuest>(true);
        foreach (AdventureMapWorldQuest adventureMapWorldQuest2 in componentsInChildren)
        {
            StackableMapIcon component2  = adventureMapWorldQuest2.GetComponent <StackableMapIcon>();
            GameObject       gameObject2 = adventureMapWorldQuest2.gameObject;
            if (component2 != null)
            {
                component2.RemoveFromContainer();
            }
            if (gameObject2 != null)
            {
                Object.DestroyImmediate(adventureMapWorldQuest2.gameObject);
            }
        }
        IEnumerator enumerator = WorldQuestData.worldQuestDictionary.Values.GetEnumerator();

        try
        {
            while (enumerator.MoveNext())
            {
                object           obj = enumerator.Current;
                MobileWorldQuest mobileWorldQuest = (MobileWorldQuest)obj;
                if (!this.IsFilterEnabled(MapFilterType.All))
                {
                    bool matchesFilter = false;
                    if (this.IsFilterEnabled(MapFilterType.ArtifactPower))
                    {
                        foreach (MobileWorldQuestReward mobileWorldQuestReward in mobileWorldQuest.Item)
                        {
                            StaticDB.itemEffectDB.EnumRecordsByParentID(mobileWorldQuestReward.RecordID, delegate(ItemEffectRec itemEffectRec)
                            {
                                StaticDB.spellEffectDB.EnumRecordsByParentID(itemEffectRec.SpellID, delegate(SpellEffectRec spellEffectRec)
                                {
                                    if (spellEffectRec.Effect == 240)
                                    {
                                        matchesFilter = true;
                                        return(false);
                                    }
                                    return(true);
                                });
                                return(!matchesFilter);
                            });
                        }
                    }
                    if (this.IsFilterEnabled(MapFilterType.OrderResources))
                    {
                        foreach (MobileWorldQuestReward mobileWorldQuestReward2 in mobileWorldQuest.Currency)
                        {
                            if (mobileWorldQuestReward2.RecordID == 1220)
                            {
                                matchesFilter = true;
                                break;
                            }
                        }
                    }
                    if (this.IsFilterEnabled(MapFilterType.Gold) && mobileWorldQuest.Money > 0)
                    {
                        matchesFilter = true;
                    }
                    if (this.IsFilterEnabled(MapFilterType.Gear))
                    {
                        foreach (MobileWorldQuestReward mobileWorldQuestReward3 in mobileWorldQuest.Item)
                        {
                            ItemRec record = StaticDB.itemDB.GetRecord(mobileWorldQuestReward3.RecordID);
                            if (record != null && (record.ClassID == 2 || record.ClassID == 3 || record.ClassID == 4 || record.ClassID == 6))
                            {
                                matchesFilter = true;
                                break;
                            }
                        }
                    }
                    if (this.IsFilterEnabled(MapFilterType.ProfessionMats))
                    {
                        foreach (MobileWorldQuestReward mobileWorldQuestReward4 in mobileWorldQuest.Item)
                        {
                            ItemRec record2 = StaticDB.itemDB.GetRecord(mobileWorldQuestReward4.RecordID);
                            if (record2 != null && record2.ClassID == 7)
                            {
                                matchesFilter = true;
                                break;
                            }
                        }
                    }
                    if (this.IsFilterEnabled(MapFilterType.PetCharms))
                    {
                        foreach (MobileWorldQuestReward mobileWorldQuestReward5 in mobileWorldQuest.Item)
                        {
                            if (mobileWorldQuestReward5.RecordID == 116415)
                            {
                                matchesFilter = true;
                                break;
                            }
                        }
                    }
                    if (this.IsFilterEnabled(MapFilterType.Bounty_HighmountainTribes) && PersistentBountyData.bountiesByWorldQuestDictionary.ContainsKey(mobileWorldQuest.QuestID))
                    {
                        MobileBountiesByWorldQuest mobileBountiesByWorldQuest = (MobileBountiesByWorldQuest)PersistentBountyData.bountiesByWorldQuestDictionary[mobileWorldQuest.QuestID];
                        for (int num2 = 0; num2 < mobileBountiesByWorldQuest.BountyQuestID.Length; num2++)
                        {
                            if (mobileBountiesByWorldQuest.BountyQuestID[num2] == 42233)
                            {
                                matchesFilter = true;
                                break;
                            }
                        }
                    }
                    if (this.IsFilterEnabled(MapFilterType.Bounty_CourtOfFarondis) && PersistentBountyData.bountiesByWorldQuestDictionary.ContainsKey(mobileWorldQuest.QuestID))
                    {
                        MobileBountiesByWorldQuest mobileBountiesByWorldQuest2 = (MobileBountiesByWorldQuest)PersistentBountyData.bountiesByWorldQuestDictionary[mobileWorldQuest.QuestID];
                        for (int num3 = 0; num3 < mobileBountiesByWorldQuest2.BountyQuestID.Length; num3++)
                        {
                            if (mobileBountiesByWorldQuest2.BountyQuestID[num3] == 42420)
                            {
                                matchesFilter = true;
                                break;
                            }
                        }
                    }
                    if (this.IsFilterEnabled(MapFilterType.Bounty_Dreamweavers) && PersistentBountyData.bountiesByWorldQuestDictionary.ContainsKey(mobileWorldQuest.QuestID))
                    {
                        MobileBountiesByWorldQuest mobileBountiesByWorldQuest3 = (MobileBountiesByWorldQuest)PersistentBountyData.bountiesByWorldQuestDictionary[mobileWorldQuest.QuestID];
                        for (int num4 = 0; num4 < mobileBountiesByWorldQuest3.BountyQuestID.Length; num4++)
                        {
                            if (mobileBountiesByWorldQuest3.BountyQuestID[num4] == 42170)
                            {
                                matchesFilter = true;
                                break;
                            }
                        }
                    }
                    if (this.IsFilterEnabled(MapFilterType.Bounty_Wardens) && PersistentBountyData.bountiesByWorldQuestDictionary.ContainsKey(mobileWorldQuest.QuestID))
                    {
                        MobileBountiesByWorldQuest mobileBountiesByWorldQuest4 = (MobileBountiesByWorldQuest)PersistentBountyData.bountiesByWorldQuestDictionary[mobileWorldQuest.QuestID];
                        for (int num5 = 0; num5 < mobileBountiesByWorldQuest4.BountyQuestID.Length; num5++)
                        {
                            if (mobileBountiesByWorldQuest4.BountyQuestID[num5] == 42422)
                            {
                                matchesFilter = true;
                                break;
                            }
                        }
                    }
                    if (this.IsFilterEnabled(MapFilterType.Bounty_Nightfallen) && PersistentBountyData.bountiesByWorldQuestDictionary.ContainsKey(mobileWorldQuest.QuestID))
                    {
                        MobileBountiesByWorldQuest mobileBountiesByWorldQuest5 = (MobileBountiesByWorldQuest)PersistentBountyData.bountiesByWorldQuestDictionary[mobileWorldQuest.QuestID];
                        for (int num6 = 0; num6 < mobileBountiesByWorldQuest5.BountyQuestID.Length; num6++)
                        {
                            if (mobileBountiesByWorldQuest5.BountyQuestID[num6] == 42421)
                            {
                                matchesFilter = true;
                                break;
                            }
                        }
                    }
                    if (this.IsFilterEnabled(MapFilterType.Bounty_Valarjar) && PersistentBountyData.bountiesByWorldQuestDictionary.ContainsKey(mobileWorldQuest.QuestID))
                    {
                        MobileBountiesByWorldQuest mobileBountiesByWorldQuest6 = (MobileBountiesByWorldQuest)PersistentBountyData.bountiesByWorldQuestDictionary[mobileWorldQuest.QuestID];
                        for (int num7 = 0; num7 < mobileBountiesByWorldQuest6.BountyQuestID.Length; num7++)
                        {
                            if (mobileBountiesByWorldQuest6.BountyQuestID[num7] == 42234)
                            {
                                matchesFilter = true;
                                break;
                            }
                        }
                    }
                    if (this.IsFilterEnabled(MapFilterType.Bounty_KirinTor) && PersistentBountyData.bountiesByWorldQuestDictionary.ContainsKey(mobileWorldQuest.QuestID))
                    {
                        MobileBountiesByWorldQuest mobileBountiesByWorldQuest7 = (MobileBountiesByWorldQuest)PersistentBountyData.bountiesByWorldQuestDictionary[mobileWorldQuest.QuestID];
                        for (int num8 = 0; num8 < mobileBountiesByWorldQuest7.BountyQuestID.Length; num8++)
                        {
                            if (mobileBountiesByWorldQuest7.BountyQuestID[num8] == 43179)
                            {
                                matchesFilter = true;
                                break;
                            }
                        }
                    }
                    if (this.IsFilterEnabled(MapFilterType.Invasion))
                    {
                        QuestInfoRec record3 = StaticDB.questInfoDB.GetRecord(mobileWorldQuest.QuestInfoID);
                        if (record3 == null)
                        {
                            break;
                        }
                        bool flag = record3.Type == 7;
                        if (flag)
                        {
                            matchesFilter = true;
                        }
                    }
                    if (!matchesFilter)
                    {
                        continue;
                    }
                }
                GameObject gameObject3 = Object.Instantiate <GameObject>(AdventureMapPanel.instance.m_AdvMapWorldQuestPrefab);
                if (mobileWorldQuest.StartLocationMapID == 1220)
                {
                    gameObject3.transform.SetParent(this.m_missionAndWorldQuestArea_BrokenIsles.transform, false);
                    float mapScale   = 0.10271506f;
                    float mapOffsetX = 1036.88037f;
                    float mapOffsetY = 597.2115f;
                    this.SetupWorldQuestIcon(mobileWorldQuest, gameObject3, mapOffsetX, mapOffsetY, mapScale);
                }
                else
                {
                    gameObject3.transform.localScale = new Vector3(1.33f, 1.33f, 1.33f);
                    gameObject3.transform.SetParent(this.m_missionAndWorldQuestArea_Argus.transform, false);
                    int worldMapAreaID = mobileWorldQuest.WorldMapAreaID;
                    if (worldMapAreaID != 1170)
                    {
                        if (worldMapAreaID != 1171)
                        {
                            if (worldMapAreaID != 1135)
                            {
                                Debug.LogError(string.Concat(new object[]
                                {
                                    "UNHANDLED WORLD QUEST AREA ID ",
                                    mobileWorldQuest.QuestTitle,
                                    " ",
                                    mobileWorldQuest.WorldMapAreaID
                                }));
                            }
                            else
                            {
                                float mapScale2   = 0.3132809f;
                                float mapOffsetX2 = 2115.88f;
                                float mapOffsetY2 = -7.788513f;
                                this.SetupWorldQuestIcon(mobileWorldQuest, gameObject3, mapOffsetX2, mapOffsetY2, mapScale2);
                            }
                        }
                        else
                        {
                            float mapScale2   = 0.38f;
                            float mapOffsetX2 = 3981f;
                            float mapOffsetY2 = 1520f;
                            this.SetupWorldQuestIcon(mobileWorldQuest, gameObject3, mapOffsetX2, mapOffsetY2, mapScale2);
                        }
                    }
                    else
                    {
                        float mapScale2   = 0.39f;
                        float mapOffsetX2 = 4832.76f;
                        float mapOffsetY2 = -1232f;
                        this.SetupWorldQuestIcon(mobileWorldQuest, gameObject3, mapOffsetX2, mapOffsetY2, mapScale2);
                    }
                }
                AdventureMapWorldQuest component3 = gameObject3.GetComponent <AdventureMapWorldQuest>();
                component3.SetQuestID(mobileWorldQuest.QuestID);
                StackableMapIcon component4 = gameObject3.GetComponent <StackableMapIcon>();
                if (component4 != null)
                {
                    component4.RegisterWithManager(mobileWorldQuest.StartLocationMapID);
                }
            }
        }
        finally
        {
            IDisposable disposable;
            if ((disposable = (enumerator as IDisposable)) != null)
            {
                disposable.Dispose();
            }
        }
        this.m_pinchZoomContentManager.ForceZoomFactorChanged();
    }
コード例 #10
0
    public void SetQuestID(int questID)
    {
        this.m_questID       = questID;
        base.gameObject.name = "WorldQuest " + this.m_questID;
        MobileWorldQuest mobileWorldQuest = (MobileWorldQuest)WorldQuestData.worldQuestDictionary[this.m_questID];

        if (mobileWorldQuest == null || mobileWorldQuest.Item == null)
        {
            return;
        }
        this.m_quantityArea.gameObject.SetActive(false);
        bool flag = false;

        foreach (MobileWorldQuestReward mobileWorldQuestReward in mobileWorldQuest.Item)
        {
            ItemRec record = StaticDB.itemDB.GetRecord(mobileWorldQuestReward.RecordID);
            if (record == null)
            {
                Debug.LogWarning(string.Concat(new object[]
                {
                    "Invalid Item ID ",
                    mobileWorldQuestReward.RecordID,
                    " from Quest ID ",
                    this.m_questID,
                    ". Ignoring for loot quality check."
                }));
            }
            else
            {
                flag = true;
                if (record.OverallQualityID > (int)this.m_lootQuality)
                {
                    this.m_lootQuality = (ITEM_QUALITY)record.OverallQualityID;
                }
                if (this.m_showLootIconInsteadOfMain)
                {
                    bool isArtifactXP = false;
                    long quantity     = 0L;
                    StaticDB.itemEffectDB.EnumRecordsByParentID(mobileWorldQuestReward.RecordID, delegate(ItemEffectRec itemEffectRec)
                    {
                        StaticDB.spellEffectDB.EnumRecordsByParentID(itemEffectRec.SpellID, delegate(SpellEffectRec spellEffectRec)
                        {
                            if (spellEffectRec.Effect == 240)
                            {
                                isArtifactXP = true;
                                quantity     = GeneralHelpers.ApplyArtifactXPMultiplier((long)spellEffectRec.EffectBasePoints, (double)GarrisonStatus.ArtifactXpMultiplier);
                                return(false);
                            }
                            return(true);
                        });
                        return(!isArtifactXP);
                    });
                    if (isArtifactXP)
                    {
                        this.m_main.sprite = Resources.Load <Sprite>("WorldMap/INV_Artifact_XP02");
                        if (AdventureMapPanel.instance.IsFilterEnabled(MapFilterType.ArtifactPower))
                        {
                            this.m_quantityArea.gameObject.SetActive(true);
                            this.m_quantity.text = quantity.ToString();
                        }
                    }
                    else
                    {
                        this.m_main.sprite = GeneralHelpers.LoadIconAsset(AssetBundleType.Icons, mobileWorldQuestReward.FileDataID);
                        this.m_itemID      = mobileWorldQuestReward.RecordID;
                        this.m_itemContext = mobileWorldQuestReward.ItemContext;
                        this.ShowILVL();
                    }
                }
            }
        }
        if (!flag && this.m_showLootIconInsteadOfMain)
        {
            if (mobileWorldQuest.Currency.GetLength(0) > 0)
            {
                foreach (MobileWorldQuestReward mobileWorldQuestReward2 in mobileWorldQuest.Currency)
                {
                    CurrencyTypesRec record2 = StaticDB.currencyTypesDB.GetRecord(mobileWorldQuestReward2.RecordID);
                    if (record2 != null)
                    {
                        this.m_main.sprite = GeneralHelpers.LoadCurrencyIcon(mobileWorldQuestReward2.RecordID);
                    }
                    if (AdventureMapPanel.instance.IsFilterEnabled(MapFilterType.OrderResources))
                    {
                        this.m_quantityArea.gameObject.SetActive(true);
                        this.m_quantity.text = mobileWorldQuestReward2.Quantity.ToString();
                    }
                }
            }
            else if (mobileWorldQuest.Money > 0)
            {
                this.m_main.sprite = Resources.Load <Sprite>("MiscIcons/INV_Misc_Coin_01");
                if (AdventureMapPanel.instance.IsFilterEnabled(MapFilterType.Gold))
                {
                    this.m_quantityArea.gameObject.SetActive(true);
                    this.m_quantity.text = string.Empty + mobileWorldQuest.Money / 100 / 100;
                }
            }
            else if (mobileWorldQuest.Experience > 0)
            {
                this.m_main.sprite = GeneralHelpers.GetLocalizedFollowerXpIcon();
            }
        }
        this.m_endTime = (long)mobileWorldQuest.EndTime;
        int             areaID  = 0;
        WorldMapAreaRec record3 = StaticDB.worldMapAreaDB.GetRecord(mobileWorldQuest.WorldMapAreaID);

        if (record3 != null)
        {
            areaID = record3.AreaID;
        }
        this.m_areaID = areaID;
        QuestInfoRec record4 = StaticDB.questInfoDB.GetRecord(mobileWorldQuest.QuestInfoID);

        if (record4 == null)
        {
            return;
        }
        bool active = (record4.Modifiers & 2) != 0;

        this.m_dragonFrame.gameObject.SetActive(active);
        bool flag2 = record4.Type == 7;

        this.m_normalGlow.gameObject.SetActive(!flag2);
        this.m_legionAssaultGlow.gameObject.SetActive(flag2);
        bool flag3 = (record4.Modifiers & 1) != 0;

        if (flag3 && record4.Type != 3)
        {
            this.m_background.sprite = Resources.Load <Sprite>("NewWorldQuest/Mobile-RareQuest");
        }
        bool flag4 = (record4.Modifiers & 4) != 0;

        if (flag4 && record4.Type != 3)
        {
            this.m_background.sprite = Resources.Load <Sprite>("NewWorldQuest/Mobile-EpicQuest");
        }
        int    uitextureAtlasMemberID;
        string text;

        switch (record4.Type)
        {
        case 1:
        {
            int profession = record4.Profession;
            switch (profession)
            {
            case 182:
                uitextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-herbalism");
                text = "Mobile-Herbalism";
                break;

            default:
                if (profession != 164)
                {
                    if (profession != 165)
                    {
                        if (profession != 129)
                        {
                            if (profession != 171)
                            {
                                if (profession != 197)
                                {
                                    if (profession != 202)
                                    {
                                        if (profession != 333)
                                        {
                                            if (profession != 356)
                                            {
                                                if (profession != 393)
                                                {
                                                    if (profession != 755)
                                                    {
                                                        if (profession != 773)
                                                        {
                                                            if (profession != 794)
                                                            {
                                                                uitextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-questmarker-questbang");
                                                                text = "Mobile-QuestExclamationIcon";
                                                            }
                                                            else
                                                            {
                                                                uitextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-archaeology");
                                                                text = "Mobile-Archaeology";
                                                            }
                                                        }
                                                        else
                                                        {
                                                            uitextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-inscription");
                                                            text = "Mobile-Inscription";
                                                        }
                                                    }
                                                    else
                                                    {
                                                        uitextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-jewelcrafting");
                                                        text = "Mobile-Jewelcrafting";
                                                    }
                                                }
                                                else
                                                {
                                                    uitextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-skinning");
                                                    text = "Mobile-Skinning";
                                                }
                                            }
                                            else
                                            {
                                                uitextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-fishing");
                                                text = "Mobile-Fishing";
                                            }
                                        }
                                        else
                                        {
                                            uitextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-enchanting");
                                            text = "Mobile-Enchanting";
                                        }
                                    }
                                    else
                                    {
                                        uitextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-engineering");
                                        text = "Mobile-Engineering";
                                    }
                                }
                                else
                                {
                                    uitextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-tailoring");
                                    text = "Mobile-Tailoring";
                                }
                            }
                            else
                            {
                                uitextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-alchemy");
                                text = "Mobile-Alchemy";
                            }
                        }
                        else
                        {
                            uitextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-firstaid");
                            text = "Mobile-FirstAid";
                        }
                    }
                    else
                    {
                        uitextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-leatherworking");
                        text = "Mobile-Leatherworking";
                    }
                }
                else
                {
                    uitextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-blacksmithing");
                    text = "Mobile-Blacksmithing";
                }
                break;

            case 185:
                uitextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-cooking");
                text = "Mobile-Cooking";
                break;

            case 186:
                uitextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-mining");
                text = "Mobile-Mining";
                break;
            }
            goto IL_70A;
        }

        case 3:
            uitextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-pvp-ffa");
            text = "Mobile-PVP";
            goto IL_70A;

        case 4:
            uitextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-petbattle");
            text = "Mobile-Pets";
            goto IL_70A;
        }
        uitextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-questmarker-questbang");
        text = "Mobile-QuestExclamationIcon";
IL_70A:
        if (!this.m_showLootIconInsteadOfMain)
        {
            if (text != null)
            {
                this.m_main.sprite = Resources.Load <Sprite>("NewWorldQuest/" + text);
            }
            else if (uitextureAtlasMemberID > 0)
            {
                this.m_main.sprite = TextureAtlas.instance.GetAtlasSprite(uitextureAtlasMemberID);
                this.m_main.SetNativeSize();
            }
        }
    }
コード例 #11
0
    public void SetQuestID(int questID)
    {
        this.m_questID = questID;
        base.get_gameObject().set_name("WorldQuest " + this.m_questID);
        MobileWorldQuest mobileWorldQuest = (MobileWorldQuest)WorldQuestData.worldQuestDictionary.get_Item(this.m_questID);

        if (mobileWorldQuest == null || mobileWorldQuest.Item == null)
        {
            return;
        }
        MobileWorldQuestReward[] item = mobileWorldQuest.Item;
        for (int i = 0; i < item.Length; i++)
        {
            MobileWorldQuestReward mobileWorldQuestReward = item[i];
            ItemRec record = StaticDB.itemDB.GetRecord(mobileWorldQuestReward.RecordID);
            if (record == null)
            {
                Debug.LogWarning(string.Concat(new object[]
                {
                    "Invalid Item ID ",
                    mobileWorldQuestReward.RecordID,
                    " from Quest ID ",
                    this.m_questID,
                    ". Ignoring for loot quality check."
                }));
            }
            else
            {
                if (record.OverallQualityID > (int)this.m_lootQuality)
                {
                    this.m_lootQuality = (ITEM_QUALITY)record.OverallQualityID;
                }
                if (this.m_showLootIconInsteadOfMain)
                {
                    this.m_main.set_sprite(GeneralHelpers.LoadIconAsset(AssetBundleType.Icons, mobileWorldQuestReward.FileDataID));
                }
            }
        }
        if (this.m_showLootIconInsteadOfMain)
        {
            if (mobileWorldQuest.Money > 0)
            {
                this.m_main.set_sprite(Resources.Load <Sprite>("MiscIcons/INV_Misc_Coin_01"));
            }
            if (mobileWorldQuest.Experience > 0)
            {
                this.m_main.set_sprite(GeneralHelpers.GetLocalizedFollowerXpIcon());
            }
            MobileWorldQuestReward[] currency = mobileWorldQuest.Currency;
            for (int j = 0; j < currency.Length; j++)
            {
                MobileWorldQuestReward mobileWorldQuestReward2 = currency[j];
                CurrencyTypesRec       record2 = StaticDB.currencyTypesDB.GetRecord(mobileWorldQuestReward2.RecordID);
                if (record2 != null)
                {
                    this.m_main.set_sprite(GeneralHelpers.LoadCurrencyIcon(mobileWorldQuestReward2.RecordID));
                }
            }
        }
        this.m_endTime = (long)mobileWorldQuest.EndTime;
        int             areaID  = 0;
        WorldMapAreaRec record3 = StaticDB.worldMapAreaDB.GetRecord(mobileWorldQuest.WorldMapAreaID);

        if (record3 != null)
        {
            areaID = record3.AreaID;
        }
        this.m_areaID = areaID;
        QuestInfoRec record4 = StaticDB.questInfoDB.GetRecord(mobileWorldQuest.QuestInfoID);

        if (record4 == null)
        {
            return;
        }
        bool active = (record4.Modifiers & 2) != 0;

        this.m_dragonFrame.get_gameObject().SetActive(active);
        bool flag = (record4.Modifiers & 1) != 0;

        if (flag && record4.Type != 3)
        {
            this.m_background.set_sprite(Resources.Load <Sprite>("NewWorldQuest/Mobile-RareQuest"));
        }
        bool flag2 = (record4.Modifiers & 4) != 0;

        if (flag2 && record4.Type != 3)
        {
            this.m_background.set_sprite(Resources.Load <Sprite>("NewWorldQuest/Mobile-EpicQuest"));
        }
        int    uITextureAtlasMemberID;
        string text;

        switch (record4.Type)
        {
        case 1:
        {
            int profession = record4.Profession;
            switch (profession)
            {
            case 182:
                uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-herbalism");
                text = "Mobile-Herbalism";
                goto IL_50E;

            case 183:
            case 184:
IL_2F9:
                if (profession == 164)
                {
                    uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-blacksmithing");
                    text = "Mobile-Blacksmithing";
                    goto IL_50E;
                }
                if (profession == 165)
                {
                    uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-leatherworking");
                    text = "Mobile-Leatherworking";
                    goto IL_50E;
                }
                if (profession == 129)
                {
                    uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-firstaid");
                    text = "Mobile-FirstAid";
                    goto IL_50E;
                }
                if (profession == 171)
                {
                    uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-alchemy");
                    text = "Mobile-Alchemy";
                    goto IL_50E;
                }
                if (profession == 197)
                {
                    uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-tailoring");
                    text = "Mobile-Tailoring";
                    goto IL_50E;
                }
                if (profession == 202)
                {
                    uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-engineering");
                    text = "Mobile-Engineering";
                    goto IL_50E;
                }
                if (profession == 333)
                {
                    uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-enchanting");
                    text = "Mobile-Enchanting";
                    goto IL_50E;
                }
                if (profession == 356)
                {
                    uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-fishing");
                    text = "Mobile-Fishing";
                    goto IL_50E;
                }
                if (profession == 393)
                {
                    uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-skinning");
                    text = "Mobile-Skinning";
                    goto IL_50E;
                }
                if (profession == 755)
                {
                    uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-jewelcrafting");
                    text = "Mobile-Jewelcrafting";
                    goto IL_50E;
                }
                if (profession == 773)
                {
                    uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-inscription");
                    text = "Mobile-Inscription";
                    goto IL_50E;
                }
                if (profession != 794)
                {
                    uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-questmarker-questbang");
                    text = "Mobile-QuestExclamationIcon";
                    goto IL_50E;
                }
                uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-archaeology");
                text = "Mobile-Archaeology";
                goto IL_50E;

            case 185:
                uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-cooking");
                text = "Mobile-Cooking";
                goto IL_50E;

            case 186:
                uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-mining");
                text = "Mobile-Mining";
                goto IL_50E;
            }
            goto IL_2F9;
IL_50E:
            goto IL_55B;
        }

        case 3:
            uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-pvp-ffa");
            text = "Mobile-PVP";
            goto IL_55B;

        case 4:
            uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-petbattle");
            text = "Mobile-Pets";
            goto IL_55B;
        }
        uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-questmarker-questbang");
        text = "Mobile-QuestExclamationIcon";
IL_55B:
        if (!this.m_showLootIconInsteadOfMain)
        {
            if (text != null)
            {
                this.m_main.set_sprite(Resources.Load <Sprite>("NewWorldQuest/" + text));
            }
            else if (uITextureAtlasMemberID > 0)
            {
                this.m_main.set_sprite(TextureAtlas.instance.GetAtlasSprite(uITextureAtlasMemberID));
                this.m_main.SetNativeSize();
            }
        }
    }
コード例 #12
0
    public void SetQuest(int questID)
    {
        this.m_expiringSoon.gameObject.SetActive(false);
        this.m_questID = questID;
        Transform[] componentsInChildren = this.m_worldQuestObjectiveRoot.GetComponentsInChildren <Transform>(true);
        foreach (Transform transform in componentsInChildren)
        {
            if (transform != null && transform != this.m_worldQuestObjectiveRoot.transform)
            {
                Object.DestroyImmediate(transform.gameObject);
            }
        }
        MobileWorldQuest mobileWorldQuest = (MobileWorldQuest)WorldQuestData.worldQuestDictionary[this.m_questID];
        GameObject       gameObject       = Object.Instantiate <GameObject>(this.m_worldQuestObjectiveDisplayPrefab);

        gameObject.transform.SetParent(this.m_worldQuestObjectiveRoot.transform, false);
        Text component = gameObject.GetComponent <Text>();

        component.text = mobileWorldQuest.QuestTitle;
        component.resizeTextMaxSize = 26;
        BountySite[] componentsInChildren2 = this.m_bountyLogoRoot.transform.GetComponentsInChildren <BountySite>(true);
        foreach (BountySite bountySite in componentsInChildren2)
        {
            Object.DestroyImmediate(bountySite.gameObject);
        }
        if (PersistentBountyData.bountiesByWorldQuestDictionary.ContainsKey(mobileWorldQuest.QuestID))
        {
            MobileBountiesByWorldQuest mobileBountiesByWorldQuest = (MobileBountiesByWorldQuest)PersistentBountyData.bountiesByWorldQuestDictionary[mobileWorldQuest.QuestID];
            for (int k = 0; k < mobileBountiesByWorldQuest.BountyQuestID.Length; k++)
            {
                IEnumerator enumerator = PersistentBountyData.bountyDictionary.Values.GetEnumerator();
                try
                {
                    while (enumerator.MoveNext())
                    {
                        object obj = enumerator.Current;
                        MobileWorldQuestBounty mobileWorldQuestBounty = (MobileWorldQuestBounty)obj;
                        if (mobileBountiesByWorldQuest.BountyQuestID[k] == mobileWorldQuestBounty.QuestID)
                        {
                            QuestV2Rec record = StaticDB.questDB.GetRecord(mobileWorldQuestBounty.QuestID);
                            if (record != null)
                            {
                                GameObject gameObject2 = Object.Instantiate <GameObject>(this.m_worldQuestObjectiveDisplayPrefab);
                                gameObject2.transform.SetParent(this.m_worldQuestObjectiveRoot.transform, false);
                                Text component2 = gameObject2.GetComponent <Text>();
                                component2.text  = record.QuestTitle;
                                component2.color = new Color(1f, 0.773f, 0f, 1f);
                                BountySite bountySite2 = Object.Instantiate <BountySite>(this.m_bountyLogoPrefab);
                                bountySite2.SetBounty(mobileWorldQuestBounty);
                                bountySite2.transform.SetParent(this.m_bountyLogoRoot.transform, false);
                            }
                        }
                    }
                }
                finally
                {
                    IDisposable disposable;
                    if ((disposable = (enumerator as IDisposable)) != null)
                    {
                        disposable.Dispose();
                    }
                }
            }
        }
        GameObject gameObject3 = Object.Instantiate <GameObject>(this.m_worldQuestObjectiveDisplayPrefab);

        gameObject3.transform.SetParent(this.m_worldQuestObjectiveRoot.transform, false);
        this.m_worldQuestTimeText       = gameObject3.GetComponent <Text>();
        this.m_worldQuestTimeText.text  = mobileWorldQuest.QuestTitle;
        this.m_worldQuestTimeText.color = new Color(1f, 0.773f, 0f, 1f);
        foreach (MobileWorldQuestObjective mobileWorldQuestObjective in mobileWorldQuest.Objective.AsEnumerable <MobileWorldQuestObjective>())
        {
            GameObject gameObject4 = Object.Instantiate <GameObject>(this.m_worldQuestObjectiveDisplayPrefab);
            gameObject4.transform.SetParent(this.m_worldQuestObjectiveRoot.transform, false);
            Text component3 = gameObject4.GetComponent <Text>();
            component3.text = "- " + mobileWorldQuestObjective.Text;
        }
        this.InitRewardInfoDisplay(mobileWorldQuest);
        this.m_endTime = (long)mobileWorldQuest.EndTime;
        QuestInfoRec record2 = StaticDB.questInfoDB.GetRecord(mobileWorldQuest.QuestInfoID);

        if (record2 == null)
        {
            return;
        }
        bool active = (record2.Modifiers & 2) != 0;

        this.m_dragonFrame.gameObject.SetActive(active);
        if (record2.Type == 7)
        {
            this.m_background.sprite = Resources.Load <Sprite>("NewWorldQuest/Mobile-NormalQuest");
            this.m_main.sprite       = Resources.Load <Sprite>("NewWorldQuest/Map-LegionInvasion-SargerasCrest");
            return;
        }
        this.m_background.sprite = Resources.Load <Sprite>("NewWorldQuest/Mobile-NormalQuest");
        bool flag = (record2.Modifiers & 1) != 0;

        if (flag && record2.Type != 3)
        {
            this.m_background.sprite = Resources.Load <Sprite>("NewWorldQuest/Mobile-RareQuest");
        }
        bool flag2 = (record2.Modifiers & 4) != 0;

        if (flag2 && record2.Type != 3)
        {
            this.m_background.sprite = Resources.Load <Sprite>("NewWorldQuest/Mobile-EpicQuest");
        }
        int    uitextureAtlasMemberID;
        string text;

        switch (record2.Type)
        {
        case 1:
        {
            int profession = record2.Profession;
            switch (profession)
            {
            case 182:
                uitextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-herbalism");
                text = "Mobile-Herbalism";
                break;

            default:
                if (profession != 164)
                {
                    if (profession != 165)
                    {
                        if (profession != 129)
                        {
                            if (profession != 171)
                            {
                                if (profession != 197)
                                {
                                    if (profession != 202)
                                    {
                                        if (profession != 333)
                                        {
                                            if (profession != 356)
                                            {
                                                if (profession != 393)
                                                {
                                                    if (profession != 755)
                                                    {
                                                        if (profession != 773)
                                                        {
                                                            if (profession != 794)
                                                            {
                                                                uitextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-questmarker-questbang");
                                                                text = "Mobile-QuestExclamationIcon";
                                                            }
                                                            else
                                                            {
                                                                uitextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-archaeology");
                                                                text = "Mobile-Archaeology";
                                                            }
                                                        }
                                                        else
                                                        {
                                                            uitextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-inscription");
                                                            text = "Mobile-Inscription";
                                                        }
                                                    }
                                                    else
                                                    {
                                                        uitextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-jewelcrafting");
                                                        text = "Mobile-Jewelcrafting";
                                                    }
                                                }
                                                else
                                                {
                                                    uitextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-skinning");
                                                    text = "Mobile-Skinning";
                                                }
                                            }
                                            else
                                            {
                                                uitextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-fishing");
                                                text = "Mobile-Fishing";
                                            }
                                        }
                                        else
                                        {
                                            uitextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-enchanting");
                                            text = "Mobile-Enchanting";
                                        }
                                    }
                                    else
                                    {
                                        uitextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-engineering");
                                        text = "Mobile-Engineering";
                                    }
                                }
                                else
                                {
                                    uitextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-tailoring");
                                    text = "Mobile-Tailoring";
                                }
                            }
                            else
                            {
                                uitextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-alchemy");
                                text = "Mobile-Alchemy";
                            }
                        }
                        else
                        {
                            uitextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-firstaid");
                            text = "Mobile-FirstAid";
                        }
                    }
                    else
                    {
                        uitextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-leatherworking");
                        text = "Mobile-Leatherworking";
                    }
                }
                else
                {
                    uitextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-blacksmithing");
                    text = "Mobile-Blacksmithing";
                }
                break;

            case 185:
                uitextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-cooking");
                text = "Mobile-Cooking";
                break;

            case 186:
                uitextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-mining");
                text = "Mobile-Mining";
                break;
            }
            goto IL_729;
        }

        case 3:
            uitextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-pvp-ffa");
            text = "Mobile-PVP";
            goto IL_729;

        case 4:
            uitextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-petbattle");
            text = "Mobile-Pets";
            goto IL_729;
        }
        uitextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-questmarker-questbang");
        text = "Mobile-QuestExclamationIcon";
IL_729:
        if (text != null)
        {
            this.m_main.sprite = Resources.Load <Sprite>("NewWorldQuest/" + text);
        }
        else if (uitextureAtlasMemberID > 0)
        {
            this.m_main.sprite = TextureAtlas.instance.GetAtlasSprite(uitextureAtlasMemberID);
            this.m_main.SetNativeSize();
        }
        this.UpdateTimeRemaining();
    }
コード例 #13
0
    public void SetQuest(int questID)
    {
        this.m_expiringSoon.get_gameObject().SetActive(false);
        this.m_questID = questID;
        Transform[] componentsInChildren = this.m_worldQuestObjectiveRoot.GetComponentsInChildren <Transform>(true);
        Transform[] array = componentsInChildren;
        for (int i = 0; i < array.Length; i++)
        {
            Transform transform = array[i];
            if (transform != null && transform != this.m_worldQuestObjectiveRoot.get_transform())
            {
                Object.DestroyImmediate(transform.get_gameObject());
            }
        }
        MobileWorldQuest mobileWorldQuest = (MobileWorldQuest)WorldQuestData.worldQuestDictionary.get_Item(this.m_questID);
        GameObject       gameObject       = Object.Instantiate <GameObject>(this.m_worldQuestObjectiveDisplayPrefab);

        gameObject.get_transform().SetParent(this.m_worldQuestObjectiveRoot.get_transform(), false);
        Text component = gameObject.GetComponent <Text>();

        component.set_text(mobileWorldQuest.QuestTitle);
        component.set_resizeTextMaxSize(26);
        BountySite[] componentsInChildren2 = this.m_bountyLogoRoot.get_transform().GetComponentsInChildren <BountySite>(true);
        BountySite[] array2 = componentsInChildren2;
        for (int j = 0; j < array2.Length; j++)
        {
            BountySite bountySite = array2[j];
            Object.DestroyImmediate(bountySite.get_gameObject());
        }
        if (PersistentBountyData.bountiesByWorldQuestDictionary.ContainsKey(mobileWorldQuest.QuestID))
        {
            MobileBountiesByWorldQuest mobileBountiesByWorldQuest = (MobileBountiesByWorldQuest)PersistentBountyData.bountiesByWorldQuestDictionary.get_Item(mobileWorldQuest.QuestID);
            for (int k = 0; k < mobileBountiesByWorldQuest.BountyQuestID.Length; k++)
            {
                IEnumerator enumerator = PersistentBountyData.bountyDictionary.get_Values().GetEnumerator();
                try
                {
                    while (enumerator.MoveNext())
                    {
                        MobileWorldQuestBounty mobileWorldQuestBounty = (MobileWorldQuestBounty)enumerator.get_Current();
                        if (mobileBountiesByWorldQuest.BountyQuestID[k] == mobileWorldQuestBounty.QuestID)
                        {
                            QuestV2Rec record = StaticDB.questDB.GetRecord(mobileWorldQuestBounty.QuestID);
                            if (record != null)
                            {
                                GameObject gameObject2 = Object.Instantiate <GameObject>(this.m_worldQuestObjectiveDisplayPrefab);
                                gameObject2.get_transform().SetParent(this.m_worldQuestObjectiveRoot.get_transform(), false);
                                this.m_worldQuestTimeText = gameObject2.GetComponent <Text>();
                                this.m_worldQuestTimeText.set_text(record.QuestTitle);
                                this.m_worldQuestTimeText.set_horizontalOverflow(1);
                                this.m_worldQuestTimeText.set_color(new Color(1f, 0.773f, 0f, 1f));
                                BountySite bountySite2 = Object.Instantiate <BountySite>(this.m_bountyLogoPrefab);
                                bountySite2.SetBounty(mobileWorldQuestBounty);
                                bountySite2.get_transform().SetParent(this.m_bountyLogoRoot.get_transform(), false);
                            }
                        }
                    }
                }
                finally
                {
                    IDisposable disposable = enumerator as IDisposable;
                    if (disposable != null)
                    {
                        disposable.Dispose();
                    }
                }
            }
        }
        GameObject gameObject3 = Object.Instantiate <GameObject>(this.m_worldQuestObjectiveDisplayPrefab);

        gameObject3.get_transform().SetParent(this.m_worldQuestObjectiveRoot.get_transform(), false);
        this.m_worldQuestTimeText = gameObject3.GetComponent <Text>();
        this.m_worldQuestTimeText.set_text(mobileWorldQuest.QuestTitle);
        this.m_worldQuestTimeText.set_horizontalOverflow(1);
        this.m_worldQuestTimeText.set_color(new Color(1f, 0.773f, 0f, 1f));
        using (IEnumerator <MobileWorldQuestObjective> enumerator2 = Enumerable.AsEnumerable <MobileWorldQuestObjective>(mobileWorldQuest.Objective).GetEnumerator())
        {
            while (enumerator2.MoveNext())
            {
                MobileWorldQuestObjective current = enumerator2.get_Current();
                GameObject gameObject4            = Object.Instantiate <GameObject>(this.m_worldQuestObjectiveDisplayPrefab);
                gameObject4.get_transform().SetParent(this.m_worldQuestObjectiveRoot.get_transform(), false);
                Text component2 = gameObject4.GetComponent <Text>();
                component2.set_text("-" + current.Text);
            }
        }
        this.InitRewardInfoDisplay(mobileWorldQuest);
        this.m_endTime = (long)(mobileWorldQuest.EndTime - 900);
        QuestInfoRec record2 = StaticDB.questInfoDB.GetRecord(mobileWorldQuest.QuestInfoID);

        if (record2 == null)
        {
            return;
        }
        bool active = (record2.Modifiers & 2) != 0;

        this.m_dragonFrame.get_gameObject().SetActive(active);
        this.m_background.set_sprite(Resources.Load <Sprite>("NewWorldQuest/Mobile-NormalQuest"));
        bool flag = (record2.Modifiers & 1) != 0;

        if (flag && record2.Type != 3)
        {
            this.m_background.set_sprite(Resources.Load <Sprite>("NewWorldQuest/Mobile-RareQuest"));
        }
        bool flag2 = (record2.Modifiers & 4) != 0;

        if (flag2 && record2.Type != 3)
        {
            this.m_background.set_sprite(Resources.Load <Sprite>("NewWorldQuest/Mobile-EpicQuest"));
        }
        int    uITextureAtlasMemberID;
        string text;

        switch (record2.Type)
        {
        case 1:
        {
            int profession = record2.Profession;
            switch (profession)
            {
            case 182:
                uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-herbalism");
                text = "Mobile-Herbalism";
                goto IL_6CB;

            case 183:
            case 184:
IL_4B6:
                if (profession == 164)
                {
                    uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-blacksmithing");
                    text = "Mobile-Blacksmithing";
                    goto IL_6CB;
                }
                if (profession == 165)
                {
                    uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-leatherworking");
                    text = "Mobile-Leatherworking";
                    goto IL_6CB;
                }
                if (profession == 129)
                {
                    uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-firstaid");
                    text = "Mobile-FirstAid";
                    goto IL_6CB;
                }
                if (profession == 171)
                {
                    uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-alchemy");
                    text = "Mobile-Alchemy";
                    goto IL_6CB;
                }
                if (profession == 197)
                {
                    uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-tailoring");
                    text = "Mobile-Tailoring";
                    goto IL_6CB;
                }
                if (profession == 202)
                {
                    uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-engineering");
                    text = "Mobile-Engineering";
                    goto IL_6CB;
                }
                if (profession == 333)
                {
                    uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-enchanting");
                    text = "Mobile-Enchanting";
                    goto IL_6CB;
                }
                if (profession == 356)
                {
                    uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-fishing");
                    text = "Mobile-Fishing";
                    goto IL_6CB;
                }
                if (profession == 393)
                {
                    uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-skinning");
                    text = "Mobile-Skinning";
                    goto IL_6CB;
                }
                if (profession == 755)
                {
                    uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-jewelcrafting");
                    text = "Mobile-Jewelcrafting";
                    goto IL_6CB;
                }
                if (profession == 773)
                {
                    uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-inscription");
                    text = "Mobile-Inscription";
                    goto IL_6CB;
                }
                if (profession != 794)
                {
                    uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-questmarker-questbang");
                    text = "Mobile-QuestExclamationIcon";
                    goto IL_6CB;
                }
                uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-archaeology");
                text = "Mobile-Archaeology";
                goto IL_6CB;

            case 185:
                uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-cooking");
                text = "Mobile-Cooking";
                goto IL_6CB;

            case 186:
                uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-mining");
                text = "Mobile-Mining";
                goto IL_6CB;
            }
            goto IL_4B6;
IL_6CB:
            goto IL_718;
        }

        case 3:
            uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-pvp-ffa");
            text = "Mobile-PVP";
            goto IL_718;

        case 4:
            uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-petbattle");
            text = "Mobile-Pets";
            goto IL_718;
        }
        uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-questmarker-questbang");
        text = "Mobile-QuestExclamationIcon";
IL_718:
        if (text != null)
        {
            this.m_main.set_sprite(Resources.Load <Sprite>("NewWorldQuest/" + text));
        }
        else if (uITextureAtlasMemberID > 0)
        {
            this.m_main.set_sprite(TextureAtlas.instance.GetAtlasSprite(uITextureAtlasMemberID));
            this.m_main.SetNativeSize();
        }
        this.UpdateTimeRemaining();
    }