Exemple #1
0
    private void CreateMissionSite(int garrMissionID)
    {
        GarrMissionRec record = StaticDB.garrMissionDB.GetRecord(garrMissionID);

        if (record == null)
        {
            Debug.LogWarning("Mission Not Found: ID " + garrMissionID);
            return;
        }
        if (record.GarrFollowerTypeID != 4u)
        {
            return;
        }
        if ((record.Flags & 16u) != 0u)
        {
            return;
        }
        if (!PersistentMissionData.missionDictionary.ContainsKey(garrMissionID))
        {
            return;
        }
        JamGarrisonMobileMission jamGarrisonMobileMission = (JamGarrisonMobileMission)PersistentMissionData.missionDictionary.get_Item(garrMissionID);

        if (jamGarrisonMobileMission.MissionState == 0)
        {
            return;
        }
        GameObject gameObject = Object.Instantiate <GameObject>(AdventureMapPanel.instance.m_AdvMapMissionSitePrefab);

        gameObject.get_transform().SetParent(this.m_missionAndWordQuestArea.get_transform(), false);
        float num  = 1.84887111f;
        float num2 = record.Mappos_x * num;
        float num3 = record.Mappos_y * -num;
        float num4 = -272.5694f;
        float num5 = 1318.388f;

        num2 += num4;
        num3 += num5;
        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(num2 / width, num3 / height);
        RectTransform component = gameObject.GetComponent <RectTransform>();

        component.set_anchorMin(vector);
        component.set_anchorMax(vector);
        component.set_anchoredPosition(Vector2.get_zero());
        AdventureMapMissionSite component2 = gameObject.GetComponent <AdventureMapMissionSite>();

        component2.SetMission(record.ID);
        StackableMapIcon component3 = gameObject.GetComponent <StackableMapIcon>();

        if (component3 != null)
        {
            component3.RegisterWithManager();
        }
    }
Exemple #2
0
    public void HandleBountyInfoUpdated()
    {
        BountySite[] componentsInChildren = this.m_missionAndWordQuestArea.get_transform().GetComponentsInChildren <BountySite>(true);
        BountySite[] array = componentsInChildren;
        for (int i = 0; i < array.Length; i++)
        {
            BountySite bountySite = array[i];
            Object.DestroyImmediate(bountySite.get_gameObject());
        }
        IEnumerator enumerator = PersistentBountyData.bountyDictionary.get_Values().GetEnumerator();

        try
        {
            while (enumerator.MoveNext())
            {
                MobileWorldQuestBounty mobileWorldQuestBounty = (MobileWorldQuestBounty)enumerator.get_Current();
                GameObject             gameObject             = Object.Instantiate <GameObject>(this.m_bountySitePrefab);
                BountySite             component = gameObject.GetComponent <BountySite>();
                component.SetBounty(mobileWorldQuestBounty);
                gameObject.set_name("BountySite " + mobileWorldQuestBounty.QuestID);
                RectTransform component2 = gameObject.GetComponent <RectTransform>();
                gameObject.get_transform().SetParent(this.m_missionAndWordQuestArea.get_transform(), false);
                component2.set_anchorMin(new Vector2(0.5f, 0.5f));
                component2.set_anchorMax(new Vector2(0.5f, 0.5f));
                QuestV2Rec          record = StaticDB.questDB.GetRecord(mobileWorldQuestBounty.QuestID);
                bool                flag   = true;
                ZoneMissionOverview zoneMissionOverview = null;
                int questSortID = record.QuestSortID;
                if (questSortID == 7502)
                {
                    goto IL_1AA;
                }
                if (questSortID != 7503)
                {
                    if (questSortID != 7334)
                    {
                        if (questSortID != 7541)
                        {
                            if (questSortID != 7558)
                            {
                                if (questSortID != 7637)
                                {
                                    if (questSortID == 8147)
                                    {
                                        goto IL_1AA;
                                    }
                                    flag = false;
                                }
                                else
                                {
                                    zoneMissionOverview = this.m_allZoneMissionOverviews[4];
                                }
                            }
                            else
                            {
                                zoneMissionOverview = this.m_allZoneMissionOverviews[5];
                            }
                        }
                        else
                        {
                            zoneMissionOverview = this.m_allZoneMissionOverviews[3];
                        }
                    }
                    else
                    {
                        zoneMissionOverview = this.m_allZoneMissionOverviews[0];
                    }
                }
                else
                {
                    zoneMissionOverview = this.m_allZoneMissionOverviews[2];
                }
IL_1C1:
                if (flag)
                {
                    if (zoneMissionOverview.zoneNameTag.get_Length() > 0)
                    {
                        gameObject.get_transform().SetParent(zoneMissionOverview.m_bountyButtonRoot.get_transform(), false);
                    }
                    else
                    {
                        gameObject.get_transform().SetParent(zoneMissionOverview.m_anonymousBountyButtonRoot.get_transform(), false);
                    }
                    gameObject.get_transform().set_localPosition(Vector3.get_zero());
                    component.m_errorImage.get_gameObject().SetActive(false);
                }
                else
                {
                    gameObject.get_transform().set_localPosition(new Vector3(0f, 0f, 0f));
                    component.m_errorImage.get_gameObject().SetActive(true);
                }
                StackableMapIcon component3 = gameObject.GetComponent <StackableMapIcon>();
                if (component3 != null)
                {
                    component3.RegisterWithManager();
                    continue;
                }
                continue;
IL_1AA:
                zoneMissionOverview = this.m_allZoneMissionOverviews[6];
                goto IL_1C1;
            }
        }
        finally
        {
            IDisposable disposable = enumerator as IDisposable;
            if (disposable != null)
            {
                disposable.Dispose();
            }
        }
    }
Exemple #3
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();
            }
        }
    }
Exemple #4
0
    public void HandleBountyInfoUpdated()
    {
        if (this.m_mapViewContentsRT != null)
        {
            BountySite[] componentsInChildren = this.m_mapViewContentsRT.GetComponentsInChildren <BountySite>(true);
            if (componentsInChildren != null)
            {
                foreach (BountySite bountySite in componentsInChildren)
                {
                    StackableMapIcon component  = bountySite.GetComponent <StackableMapIcon>();
                    GameObject       gameObject = bountySite.gameObject;
                    if (component != null)
                    {
                        component.RemoveFromContainer();
                    }
                    if (gameObject != null)
                    {
                        Object.DestroyImmediate(gameObject);
                    }
                }
            }
        }
        if (PersistentBountyData.bountyDictionary == null)
        {
            return;
        }
        IEnumerator enumerator = PersistentBountyData.bountyDictionary.Values.GetEnumerator();

        try
        {
            while (enumerator.MoveNext())
            {
                object obj = enumerator.Current;
                MobileWorldQuestBounty mobileWorldQuestBounty = (MobileWorldQuestBounty)obj;
                GameObject             gameObject2            = Object.Instantiate <GameObject>(this.m_bountySitePrefab);
                if (!(gameObject2 == null))
                {
                    BountySite component2 = gameObject2.GetComponent <BountySite>();
                    if (!(component2 == null))
                    {
                        component2.SetBounty(mobileWorldQuestBounty);
                        gameObject2.name = "BountySite " + mobileWorldQuestBounty.QuestID;
                        RectTransform component3 = gameObject2.GetComponent <RectTransform>();
                        if (!(component3 == null))
                        {
                            component3.anchorMin = new Vector2(0.5f, 0.5f);
                            component3.anchorMax = new Vector2(0.5f, 0.5f);
                            QuestV2Rec          record = StaticDB.questDB.GetRecord(mobileWorldQuestBounty.QuestID);
                            int                 num    = (record == null) ? 0 : record.QuestSortID;
                            bool                flag   = true;
                            ZoneMissionOverview zoneMissionOverview = null;
                            int                 startLocationMapID  = 1220;
                            if (num == 7502)
                            {
                                goto IL_24B;
                            }
                            if (num != 7503)
                            {
                                switch (num)
                                {
                                case 7541:
                                    zoneMissionOverview = this.m_allZoneMissionOverviews[3];
                                    break;

                                default:
                                    if (num != 7334)
                                    {
                                        if (num != 7558)
                                        {
                                            if (num != 7637)
                                            {
                                                if (num == 8147)
                                                {
                                                    goto IL_24B;
                                                }
                                                if (num != 8574)
                                                {
                                                    if (num != 8701)
                                                    {
                                                        Debug.LogError(string.Concat(new object[]
                                                        {
                                                            "INVALID QUESTSORTID ",
                                                            num,
                                                            " for quest ID:",
                                                            mobileWorldQuestBounty.QuestID
                                                        }));
                                                        flag = false;
                                                    }
                                                    else
                                                    {
                                                        zoneMissionOverview = this.m_allZoneMissionOverviews[9];
                                                    }
                                                }
                                                else
                                                {
                                                    zoneMissionOverview = this.m_allZoneMissionOverviews[7];
                                                }
                                            }
                                            else
                                            {
                                                zoneMissionOverview = this.m_allZoneMissionOverviews[4];
                                            }
                                        }
                                        else
                                        {
                                            zoneMissionOverview = this.m_allZoneMissionOverviews[5];
                                        }
                                    }
                                    else
                                    {
                                        zoneMissionOverview = this.m_allZoneMissionOverviews[0];
                                    }
                                    break;

                                case 7543:
                                    zoneMissionOverview = this.m_allZoneMissionOverviews[1];
                                    break;
                                }
                            }
                            else
                            {
                                zoneMissionOverview = this.m_allZoneMissionOverviews[2];
                            }
IL_2C9:
                            if (flag)
                            {
                                if (zoneMissionOverview != null)
                                {
                                    if (zoneMissionOverview.zoneNameTag != null && zoneMissionOverview.zoneNameTag.Length > 0)
                                    {
                                        if (zoneMissionOverview.m_bountyButtonRoot != null)
                                        {
                                            gameObject2.transform.SetParent(zoneMissionOverview.m_bountyButtonRoot.transform, false);
                                        }
                                    }
                                    else if (zoneMissionOverview.m_anonymousBountyButtonRoot != null)
                                    {
                                        gameObject2.transform.SetParent(zoneMissionOverview.m_anonymousBountyButtonRoot.transform, false);
                                    }
                                }
                                gameObject2.transform.localPosition = Vector3.zero;
                                if (component2.m_errorImage != null && component2.m_errorImage.gameObject != null)
                                {
                                    component2.m_errorImage.gameObject.SetActive(false);
                                }
                            }
                            else
                            {
                                gameObject2.transform.localPosition = new Vector3(0f, 0f, 0f);
                                if (component2.m_errorImage != null && component2.m_errorImage.gameObject != null)
                                {
                                    component2.m_errorImage.gameObject.SetActive(true);
                                }
                            }
                            StackableMapIcon component4 = gameObject2.GetComponent <StackableMapIcon>();
                            if (component4 != null)
                            {
                                component4.RegisterWithManager(startLocationMapID);
                                continue;
                            }
                            continue;
IL_24B:
                            zoneMissionOverview = this.m_allZoneMissionOverviews[6];
                            goto IL_2C9;
                        }
                    }
                }
            }
        }
        finally
        {
            IDisposable disposable;
            if ((disposable = (enumerator as IDisposable)) != null)
            {
                disposable.Dispose();
            }
        }
    }
Exemple #5
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();
    }