public void HandleBountyInfoUpdated()
        {
            if (this.m_mapViewContentsRT != null)
            {
                BountySite[] componentsInChildren = this.m_mapViewContentsRT.GetComponentsInChildren <BountySite>(true);
                if (componentsInChildren != null)
                {
                    BountySite[] bountySiteArray = componentsInChildren;
                    for (int i = 0; i < (int)bountySiteArray.Length; i++)
                    {
                        BountySite       bountySite = bountySiteArray[i];
                        StackableMapIcon component  = bountySite.GetComponent <StackableMapIcon>();
                        GameObject       gameObject = bountySite.gameObject;
                        if (component != null)
                        {
                            component.RemoveFromContainer();
                        }
                        if (gameObject != null)
                        {
                            UnityEngine.Object.Destroy(gameObject);
                        }
                    }
                }
            }
            if (PersistentBountyData.bountyDictionary == null || this.m_emissaryCollection == null)
            {
                return;
            }
            this.m_emissaryCollection.ClearCollection();
            foreach (WrapperWorldQuestBounty value in PersistentBountyData.bountyDictionary.Values)
            {
                QuestV2Rec record = StaticDB.questDB.GetRecord(value.QuestID);
                int        num    = (record == null ? 0 : record.QuestSortID);
                if (record == null)
                {
                    Debug.LogWarning(string.Concat("HandleBountyInfoUpdated Warning: Failed to get Bounty quest with ID ", value.QuestID.ToString()));
                }
                else if (num != 7502 && num != 7503)
                {
                    switch (num)
                    {
                    case 7541:
                    case 7543:
                    {
                        break;
                    }

                    default:
                    {
                        if (num == 7334 || num == 7558 || num == 7637 || num == 8147 || num == 8574 || num == 8701)
                        {
                            break;
                        }
                        GameObject gameObject1 = UnityEngine.Object.Instantiate <GameObject>(this.m_bountySitePrefab);
                        if (gameObject1 != null)
                        {
                            BountySite component1 = gameObject1.GetComponent <BountySite>();
                            if (component1 != null)
                            {
                                component1.SetBounty(value);
                                gameObject1.name = string.Concat("BountySite ", value.QuestID);
                                RectTransform vector2 = gameObject1.GetComponent <RectTransform>();
                                if (vector2 != null)
                                {
                                    vector2.anchorMin = new Vector2(0.5f, 0.5f);
                                    vector2.anchorMax = new Vector2(0.5f, 0.5f);
                                    this.m_emissaryCollection.AddBountyObjectToCollection(gameObject1);
                                    continue;
                                }
                                else
                                {
                                    continue;
                                }
                            }
                            else
                            {
                                continue;
                            }
                        }
                        else
                        {
                            continue;
                        }
                    }
                    }
                }
            }
        }
Exemplo n.º 2
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.Destroy(gameObject);
                        }
                    }
                }
            }
            if (PersistentBountyData.bountyDictionary == null || this.m_emissaryCollection == null)
            {
                return;
            }
            this.m_emissaryCollection.ClearCollection();
            foreach (WrapperWorldQuestBounty bounty in from bt in PersistentBountyData.bountyDictionary.Values
                     orderby bt.EndTime
                     select bt)
            {
                QuestV2Rec record = StaticDB.questV2DB.GetRecord(bounty.QuestID);
                int        num    = (record == null) ? 0 : record.QuestSortID;
                if (record == null)
                {
                    Debug.LogWarning("HandleBountyInfoUpdated Warning: Failed to get Bounty quest with ID " + bounty.QuestID.ToString());
                }
                else if (num != 7502 && num != 7503)
                {
                    switch (num)
                    {
                    case 7541:
                    case 7543:
                        break;

                    default:
                        if (num != 7334 && num != 7558 && num != 7637 && num != 8147 && num != 8574 && num != 8701)
                        {
                            GameObject gameObject2 = Object.Instantiate <GameObject>(this.m_bountySitePrefab);
                            if (!(gameObject2 == null))
                            {
                                BountySite component2 = gameObject2.GetComponent <BountySite>();
                                if (!(component2 == null))
                                {
                                    component2.SetBounty(bounty);
                                    gameObject2.name = "BountySite " + bounty.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);
                                        this.m_emissaryCollection.AddBountyObjectToCollection(gameObject2);
                                    }
                                }
                            }
                        }
                        break;
                    }
                }
            }
        }
Exemplo n.º 3
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.Destroy(gameObject);
                        }
                    }
                }
            }
            if (PersistentBountyData.bountyDictionary == null)
            {
                return;
            }
            foreach (WrapperWorldQuestBounty bounty in PersistentBountyData.bountyDictionary.Values)
            {
                GameObject gameObject2 = Object.Instantiate <GameObject>(this.m_bountySitePrefab);
                if (!(gameObject2 == null))
                {
                    BountySite component2 = gameObject2.GetComponent <BountySite>();
                    if (!(component2 == null))
                    {
                        component2.SetBounty(bounty);
                        gameObject2.name = "BountySite " + bounty.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(bounty.QuestID);
                            int                 num    = (record == null) ? 0 : record.QuestSortID;
                            bool                flag   = true;
                            ZoneMissionOverview zoneMissionOverview = null;
                            int                 startLocationMapID  = 1220;
                            switch (num)
                            {
                            case 8499:
                                break;

                            case 8500:
                                break;

                            case 8501:
                                break;

                            default:
                                if (num != 7502)
                                {
                                    if (num == 7503)
                                    {
                                        zoneMissionOverview = this.m_allZoneMissionOverviews[2];
                                        break;
                                    }
                                    switch (num)
                                    {
                                    case 7541:
                                        zoneMissionOverview = this.m_allZoneMissionOverviews[3];
                                        goto IL_31F;

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

                                    case 7543:
                                        zoneMissionOverview = this.m_allZoneMissionOverviews[1];
                                        goto IL_31F;
                                    }
                                }
                                zoneMissionOverview = this.m_allZoneMissionOverviews[6];
                                break;
                            }
IL_31F:
                            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.SetActive(false);
                                }
                            }
                            else
                            {
                                gameObject2.transform.localPosition = new Vector3(0f, 0f, 0f);
                                if (component2.m_errorImage != null)
                                {
                                    component2.m_errorImage.gameObject.SetActive(true);
                                }
                            }
                            StackableMapIcon component4 = gameObject2.GetComponent <StackableMapIcon>();
                            if (component4 != null)
                            {
                                component4.RegisterWithManager(startLocationMapID);
                            }
                        }
                    }
                }
            }
        }
Exemplo n.º 4
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.Destroy(transform.gameObject);
                }
            }
            WrapperWorldQuest worldQuest = 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 = worldQuest.QuestTitle;
            component.resizeTextMaxSize = 26;
            BountySite[] componentsInChildren2 = this.m_bountyLogoRoot.transform.GetComponentsInChildren <BountySite>(true);
            foreach (BountySite bountySite in componentsInChildren2)
            {
                Object.Destroy(bountySite.gameObject);
            }
            if (PersistentBountyData.bountiesByWorldQuestDictionary.ContainsKey(worldQuest.QuestID))
            {
                WrapperBountiesByWorldQuest wrapperBountiesByWorldQuest = PersistentBountyData.bountiesByWorldQuestDictionary[worldQuest.QuestID];
                for (int k = 0; k < wrapperBountiesByWorldQuest.BountyQuestIDs.Count; k++)
                {
                    foreach (WrapperWorldQuestBounty bounty in PersistentBountyData.bountyDictionary.Values)
                    {
                        if (wrapperBountiesByWorldQuest.BountyQuestIDs[k] == bounty.QuestID)
                        {
                            QuestV2Rec record = StaticDB.questDB.GetRecord(bounty.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(bounty);
                                bountySite2.transform.SetParent(this.m_bountyLogoRoot.transform, false);
                            }
                        }
                    }
                }
            }
            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  = worldQuest.QuestTitle;
            this.m_worldQuestTimeText.color = new Color(1f, 0.773f, 0f, 1f);
            foreach (WrapperWorldQuestObjective wrapperWorldQuestObjective in worldQuest.Objectives)
            {
                GameObject gameObject4 = Object.Instantiate <GameObject>(this.m_worldQuestObjectiveDisplayPrefab);
                gameObject4.transform.SetParent(this.m_worldQuestObjectiveRoot.transform, false);
                Text component3 = gameObject4.GetComponent <Text>();
                component3.text = "- " + wrapperWorldQuestObjective.Text;
            }
            this.InitRewardInfoDisplay(worldQuest);
            this.m_endTime = worldQuest.EndTime;
            QuestInfoRec record2 = StaticDB.questInfoDB.GetRecord(worldQuest.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_703;
            }

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

            case 4:
                uitextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-petbattle");
                text = "Mobile-Pets";
                goto IL_703;
            }
            uitextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-questmarker-questbang");
            text = "Mobile-QuestExclamationIcon";
IL_703:
            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();
        }
Exemplo n.º 5
0
        public void SetQuest(int questID)
        {
            this.m_expiringSoon.gameObject.SetActive(false);
            this.m_questID = questID;
            Transform[] componentsInChildren = this.m_worldQuestObjectiveRoot.GetComponentsInChildren <Transform>(true);
            for (int i = 0; i < (int)componentsInChildren.Length; i++)
            {
                Transform transforms = componentsInChildren[i];
                if (transforms != null && transforms != this.m_worldQuestObjectiveRoot.transform)
                {
                    transforms.SetParent(null);
                    UnityEngine.Object.Destroy(transforms.gameObject);
                }
            }
            WrapperWorldQuest item = WorldQuestData.WorldQuestDictionary[this.m_questID];

            this.m_worldQuestNameText.text = item.QuestTitle;
            BountySite[] bountySiteArray = this.m_bountyLogoRoot.transform.GetComponentsInChildren <BountySite>(true);
            for (int j = 0; j < (int)bountySiteArray.Length; j++)
            {
                BountySite bountySite = bountySiteArray[j];
                bountySite.transform.SetParent(null);
                UnityEngine.Object.Destroy(bountySite.gameObject);
            }
            int num = 0;

            if (PersistentBountyData.bountiesByWorldQuestDictionary.ContainsKey(item.QuestID))
            {
                WrapperBountiesByWorldQuest wrapperBountiesByWorldQuest = PersistentBountyData.bountiesByWorldQuestDictionary[item.QuestID];
                for (int k = 0; k < wrapperBountiesByWorldQuest.BountyQuestIDs.Count; k++)
                {
                    foreach (WrapperWorldQuestBounty value in PersistentBountyData.bountyDictionary.Values)
                    {
                        if (wrapperBountiesByWorldQuest.BountyQuestIDs[k] != value.QuestID)
                        {
                            continue;
                        }
                        QuestV2Rec record = StaticDB.questDB.GetRecord(value.QuestID);
                        if (record == null)
                        {
                            continue;
                        }
                        GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(this.m_worldQuestObjectiveDisplayPrefab);
                        gameObject.transform.SetParent(this.m_worldQuestObjectiveRoot.transform, false);
                        Text component = gameObject.GetComponent <Text>();
                        component.text  = record.QuestTitle;
                        component.color = new Color(1f, 0.773f, 0f, 1f);
                        BountySite bountySite1 = UnityEngine.Object.Instantiate <BountySite>(this.m_bountyLogoPrefab);
                        bountySite1.SetBounty(value);
                        bountySite1.transform.SetParent(this.m_bountyLogoRoot.transform, false);
                        num++;
                    }
                }
            }
            this.EnableBountyFiligree(num);
            GameObject gameObject1 = UnityEngine.Object.Instantiate <GameObject>(this.m_worldQuestObjectiveDisplayPrefab);

            gameObject1.transform.SetParent(this.m_worldQuestObjectiveRoot.transform, false);
            this.m_worldQuestTimeText       = gameObject1.GetComponent <Text>();
            this.m_worldQuestTimeText.text  = item.QuestTitle;
            this.m_worldQuestTimeText.color = new Color(1f, 0.773f, 0f, 1f);
            foreach (WrapperWorldQuestObjective objective in item.Objectives)
            {
                GameObject gameObject2 = UnityEngine.Object.Instantiate <GameObject>(this.m_worldQuestObjectiveDisplayPrefab);
                gameObject2.transform.SetParent(this.m_worldQuestObjectiveRoot.transform, false);
                Text text = gameObject2.GetComponent <Text>();
                text.text = string.Concat("- ", objective.Text);
            }
            this.InitRewardInfoDisplay(item);
            this.m_endTime = item.EndTime;
            QuestInfoRec questInfoRec = StaticDB.questInfoDB.GetRecord(item.QuestInfoID);

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

            this.m_dragonFrame.gameObject.SetActive(modifiers);
            if (questInfoRec.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");
            if ((questInfoRec.Modifiers & 1) != 0 && questInfoRec.Type != 3)
            {
                this.m_background.sprite = Resources.Load <Sprite>("NewWorldQuest/Mobile-RareQuest");
            }
            if ((questInfoRec.Modifiers & 4) != 0 && questInfoRec.Type != 3)
            {
                this.m_background.sprite = Resources.Load <Sprite>("NewWorldQuest/Mobile-EpicQuest");
            }
            int    uITextureAtlasMemberID = 0;
            string str = null;

            switch (questInfoRec.Type)
            {
            case 1:
            {
                int profession = questInfoRec.Profession;
                switch (profession)
                {
                case 182:
                {
                    uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-herbalism");
                    str = "Mobile-Herbalism";
                    break;
                }

                case 185:
                {
                    uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-cooking");
                    str = "Mobile-Cooking";
                    break;
                }

                case 186:
                {
                    uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-mining");
                    str = "Mobile-Mining";
                    break;
                }

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

            case 2:
            {
                uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-questmarker-questbang");
                str = "Mobile-QuestExclamationIcon";
                break;
            }

            case 3:
            {
                uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-pvp-ffa");
                str = "Mobile-PVP";
                break;
            }

            case 4:
            {
                uITextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("worldquest-icon-petbattle");
                str = "Mobile-Pets";
                break;
            }

            default:
            {
                goto case 2;
            }
            }
            if (str != null)
            {
                this.m_main.sprite = Resources.Load <Sprite>(string.Concat("NewWorldQuest/", str));
            }
            else if (uITextureAtlasMemberID > 0)
            {
                this.m_main.sprite = TextureAtlas.instance.GetAtlasSprite(uITextureAtlasMemberID);
                this.m_main.SetNativeSize();
            }
            this.UpdateTimeRemaining();
        }