示例#1
0
 private void Awake()
 {
     this.m_encounterTypeLabel.font = GeneralHelpers.LoadStandardFont();
     this.m_counteredByLabel.font   = GeneralHelpers.LoadStandardFont();
     this.m_counteredByLabel.text   = StaticDB.GetString("COUNTERED_BY", "Countered By:");
 }
    public void InitMissionList()
    {
        this.m_combatAllyListItem.get_gameObject().SetActive(false);
        MiniMissionListItem[] componentsInChildren = this.m_availableMission_listContents.GetComponentsInChildren <MiniMissionListItem>(true);
        MiniMissionListItem[] array = componentsInChildren;
        for (int i = 0; i < array.Length; i++)
        {
            MiniMissionListItem miniMissionListItem = array[i];
            bool flag = true;
            if (PersistentMissionData.missionDictionary.ContainsKey(miniMissionListItem.GetMissionID()))
            {
                JamGarrisonMobileMission jamGarrisonMobileMission = (JamGarrisonMobileMission)PersistentMissionData.missionDictionary.get_Item(miniMissionListItem.GetMissionID());
                if (jamGarrisonMobileMission.MissionState == 0)
                {
                    flag = false;
                    miniMissionListItem.UpdateMechanicPreview(false, jamGarrisonMobileMission);
                }
            }
            if (flag)
            {
                Object.DestroyImmediate(miniMissionListItem.get_gameObject());
            }
        }
        componentsInChildren = this.m_inProgressMission_listContents.GetComponentsInChildren <MiniMissionListItem>(true);
        MiniMissionListItem[] array2 = componentsInChildren;
        for (int j = 0; j < array2.Length; j++)
        {
            MiniMissionListItem miniMissionListItem2 = array2[j];
            bool flag2 = true;
            if (PersistentMissionData.missionDictionary.ContainsKey(miniMissionListItem2.GetMissionID()))
            {
                JamGarrisonMobileMission jamGarrisonMobileMission2 = (JamGarrisonMobileMission)PersistentMissionData.missionDictionary.get_Item(miniMissionListItem2.GetMissionID());
                if (jamGarrisonMobileMission2.MissionState != 0)
                {
                    flag2 = false;
                }
            }
            if (flag2)
            {
                Object.DestroyImmediate(miniMissionListItem2.get_gameObject());
            }
        }
        MiniMissionListItem[] componentsInChildren2 = this.m_availableMission_listContents.GetComponentsInChildren <MiniMissionListItem>(true);
        MiniMissionListItem[] componentsInChildren3 = this.m_inProgressMission_listContents.GetComponentsInChildren <MiniMissionListItem>(true);
        IEnumerator           enumerator            = PersistentMissionData.missionDictionary.get_Values().GetEnumerator();

        try
        {
            while (enumerator.MoveNext())
            {
                JamGarrisonMobileMission jamGarrisonMobileMission3 = (JamGarrisonMobileMission)enumerator.get_Current();
                bool flag3 = false;
                MiniMissionListItem[] array3 = componentsInChildren2;
                for (int k = 0; k < array3.Length; k++)
                {
                    MiniMissionListItem miniMissionListItem3 = array3[k];
                    if (miniMissionListItem3.GetMissionID() == jamGarrisonMobileMission3.MissionRecID)
                    {
                        flag3 = true;
                        break;
                    }
                }
                if (!flag3)
                {
                    MiniMissionListItem[] array4 = componentsInChildren3;
                    for (int l = 0; l < array4.Length; l++)
                    {
                        MiniMissionListItem miniMissionListItem4 = array4[l];
                        if (miniMissionListItem4.GetMissionID() == jamGarrisonMobileMission3.MissionRecID)
                        {
                            flag3 = true;
                            break;
                        }
                    }
                }
                if (!flag3)
                {
                    GarrMissionRec record = StaticDB.garrMissionDB.GetRecord(jamGarrisonMobileMission3.MissionRecID);
                    if (record == null)
                    {
                        Debug.LogWarning("Mission Not Found: ID " + jamGarrisonMobileMission3.MissionRecID);
                    }
                    else if (record.GarrFollowerTypeID == 4u)
                    {
                        if ((record.Flags & 16u) != 0u)
                        {
                            this.m_combatAllyListItem.get_gameObject().SetActive(true);
                        }
                        else
                        {
                            GameObject gameObject = Object.Instantiate <GameObject>(this.m_miniMissionListItemPrefab);
                            if (jamGarrisonMobileMission3.MissionState == 0)
                            {
                                gameObject.get_transform().SetParent(this.m_availableMission_listContents.get_transform(), false);
                            }
                            else
                            {
                                gameObject.get_transform().SetParent(this.m_inProgressMission_listContents.get_transform(), false);
                                this.ShowMissionStartedAnim();
                            }
                            MiniMissionListItem component = gameObject.GetComponent <MiniMissionListItem>();
                            component.SetMission(jamGarrisonMobileMission3);
                        }
                    }
                }
            }
        }
        finally
        {
            IDisposable disposable = enumerator as IDisposable;
            if (disposable != null)
            {
                disposable.Dispose();
            }
        }
        componentsInChildren2 = this.m_availableMission_listContents.GetComponentsInChildren <MiniMissionListItem>(true);
        componentsInChildren3 = this.m_inProgressMission_listContents.GetComponentsInChildren <MiniMissionListItem>(true);
        int num  = componentsInChildren2.Length;
        int num2 = componentsInChildren3.Length;

        this.m_availableMissionsTabLabel.set_text(StaticDB.GetString("AVAILABLE", null) + " - " + num);
        this.m_inProgressMissionsTabLabel.set_text(StaticDB.GetString("IN_PROGRESS", null) + " - " + num2);
        this.m_noMissionsAvailableLabel.get_gameObject().SetActive(num == 0);
        this.m_noMissionsInProgressLabel.get_gameObject().SetActive(num2 == 0);
    }
示例#3
0
    public void SetFollower(int followerID)
    {
        this.m_garrFollowerID = followerID;
        if (followerID == 0)
        {
            this.iLevelText.set_text(this.m_ilvlString + " ???");
            RectTransform[] componentsInChildren = this.traitsAndAbilitiesRootObject.GetComponentsInChildren <RectTransform>(true);
            for (int i = 0; i < componentsInChildren.Length; i++)
            {
                if (componentsInChildren[i] != null && componentsInChildren[i] != this.traitsAndAbilitiesRootObject.get_transform())
                {
                    Object.DestroyImmediate(componentsInChildren[i].get_gameObject());
                }
            }
            AbilityDisplay[] componentsInChildren2 = this.m_equipmentSlotsRootObject.GetComponentsInChildren <AbilityDisplay>(true);
            for (int j = 0; j < componentsInChildren2.Length; j++)
            {
                Object.DestroyImmediate(componentsInChildren2[j].get_gameObject());
            }
        }
        if (!PersistentFollowerData.followerDictionary.ContainsKey(followerID))
        {
            return;
        }
        GarrFollowerRec record = StaticDB.garrFollowerDB.GetRecord(followerID);

        if (record == null)
        {
            return;
        }
        CreatureRec record2 = StaticDB.creatureDB.GetRecord((GarrisonStatus.Faction() != PVP_FACTION.HORDE) ? record.AllianceCreatureID : record.HordeCreatureID);

        if (record2 == null)
        {
            return;
        }
        JamGarrisonFollower jamGarrisonFollower = PersistentFollowerData.followerDictionary.get_Item(followerID);

        this.iLevelText.set_text(this.m_ilvlString + " " + (jamGarrisonFollower.ItemLevelWeapon + jamGarrisonFollower.ItemLevelArmor) / 2);
        string text   = "Assets/BundleAssets/PortraitIcons/cid_" + record2.ID.ToString("D8") + ".png";
        Sprite sprite = AssetBundleManager.portraitIcons.LoadAsset <Sprite>(text);

        if (sprite != null)
        {
            this.followerSnapshot.set_sprite(sprite);
        }
        RectTransform[] componentsInChildren3 = this.traitsAndAbilitiesRootObject.GetComponentsInChildren <RectTransform>(true);
        for (int k = 0; k < componentsInChildren3.Length; k++)
        {
            if (componentsInChildren3[k] != null && componentsInChildren3[k] != this.traitsAndAbilitiesRootObject.get_transform())
            {
                Object.DestroyImmediate(componentsInChildren3[k].get_gameObject());
            }
        }
        bool flag = false;

        for (int l = 0; l < jamGarrisonFollower.AbilityID.Length; l++)
        {
            GarrAbilityRec record3 = StaticDB.garrAbilityDB.GetRecord(jamGarrisonFollower.AbilityID[l]);
            if ((record3.Flags & 512u) != 0u)
            {
                if (!flag)
                {
                    GameObject gameObject = Object.Instantiate <GameObject>(this.specializationHeaderPrefab);
                    gameObject.get_transform().SetParent(this.traitsAndAbilitiesRootObject.get_transform(), false);
                    flag = true;
                    Text component = gameObject.GetComponent <Text>();
                    if (component != null)
                    {
                        component.set_text(StaticDB.GetString("SPECIALIZATION", null));
                    }
                }
                GameObject gameObject2 = Object.Instantiate <GameObject>(this.abilityDisplayPrefab);
                gameObject2.get_transform().SetParent(this.traitsAndAbilitiesRootObject.get_transform(), false);
                AbilityDisplay component2 = gameObject2.GetComponent <AbilityDisplay>();
                component2.SetAbility(record3.ID, false, false, null);
            }
        }
        bool flag2 = false;

        for (int m = 0; m < jamGarrisonFollower.AbilityID.Length; m++)
        {
            GarrAbilityRec record4 = StaticDB.garrAbilityDB.GetRecord(jamGarrisonFollower.AbilityID[m]);
            if ((record4.Flags & 1u) == 0u)
            {
                if ((record4.Flags & 512u) == 0u)
                {
                    if (!flag2)
                    {
                        GameObject gameObject3 = Object.Instantiate <GameObject>(this.abilitiesHeaderPrefab);
                        gameObject3.get_transform().SetParent(this.traitsAndAbilitiesRootObject.get_transform(), false);
                        flag2 = true;
                        Text component3 = gameObject3.GetComponent <Text>();
                        if (component3 != null)
                        {
                            component3.set_text(StaticDB.GetString("ABILITIES", null));
                        }
                    }
                    GameObject gameObject4 = Object.Instantiate <GameObject>(this.abilityDisplayPrefab);
                    gameObject4.get_transform().SetParent(this.traitsAndAbilitiesRootObject.get_transform(), false);
                    AbilityDisplay component4 = gameObject4.GetComponent <AbilityDisplay>();
                    component4.SetAbility(jamGarrisonFollower.AbilityID[m], false, false, null);
                }
            }
        }
        if (jamGarrisonFollower.ZoneSupportSpellID > 0)
        {
            GameObject gameObject5 = Object.Instantiate <GameObject>(this.zoneSupportAbilityHeaderPrefab);
            gameObject5.get_transform().SetParent(this.traitsAndAbilitiesRootObject.get_transform(), false);
            GameObject gameObject6 = Object.Instantiate <GameObject>(this.m_spellDisplayPrefab);
            gameObject6.get_transform().SetParent(this.traitsAndAbilitiesRootObject.get_transform(), false);
            SpellDisplay component5 = gameObject6.GetComponent <SpellDisplay>();
            component5.SetSpell(jamGarrisonFollower.ZoneSupportSpellID);
            Text componentInChildren = gameObject5.GetComponentInChildren <Text>();
            if (componentInChildren != null)
            {
                componentInChildren.set_text(StaticDB.GetString("COMBAT_ALLY", null));
            }
        }
        bool flag3 = (jamGarrisonFollower.Flags & 8) != 0;

        if (flag3)
        {
            GarrStringRec record5 = StaticDB.garrStringDB.GetRecord((GarrisonStatus.Faction() != PVP_FACTION.ALLIANCE) ? record.HordeFlavorGarrStringID : record.AllianceFlavorGarrStringID);
            if (record5 != null)
            {
                Text text2 = Object.Instantiate <Text>(this.m_troopDescriptionPrefab);
                text2.get_transform().SetParent(this.traitsAndAbilitiesRootObject.get_transform(), false);
                text2.set_text(record5.Text);
            }
        }
        this.InitEquipmentSlots(jamGarrisonFollower);
        this.UpdateChampionButtons(jamGarrisonFollower);
    }
    public void ShowMissionResults(int garrMissionID, int missionResultType, bool awardOvermax)
    {
        GarrMissionRec record = StaticDB.garrMissionDB.GetRecord(garrMissionID);

        if (record == null)
        {
            return;
        }
        this.m_missionResultsDisplayCanvasGroupAutoFadeOut.Reset();
        this.m_currentResultType = (MissionResultType)missionResultType;
        this.m_followerExperienceDisplayArea.SetActive(false);
        this.m_attemptedAutoComplete = false;
        this.m_garrMissionID         = garrMissionID;
        this.m_darknessBG.SetActive(true);
        this.m_popupView.SetActive(true);
        this.m_bonusLootDisplay.SetActive(false);
        if (this.missionFollowerSlotGroup != null)
        {
            MissionFollowerSlot[] componentsInChildren = this.missionFollowerSlotGroup.GetComponentsInChildren <MissionFollowerSlot>(true);
            for (int i = 0; i < componentsInChildren.Length; i++)
            {
                if (componentsInChildren[i] != null && componentsInChildren[i] != this.missionFollowerSlotGroup.transform)
                {
                    Object.DestroyImmediate(componentsInChildren[i].gameObject);
                }
            }
        }
        MissionEncounter[] componentsInChildren2 = this.enemyPortraitsGroup.GetComponentsInChildren <MissionEncounter>(true);
        for (int j = 0; j < componentsInChildren2.Length; j++)
        {
            if (componentsInChildren2[j] != null && componentsInChildren2[j] != this.enemyPortraitsGroup.transform)
            {
                Object.DestroyImmediate(componentsInChildren2[j].gameObject);
            }
        }
        if (this.treasureChestHorde != null && this.treasureChestAlliance != null)
        {
            if (GarrisonStatus.Faction() == PVP_FACTION.HORDE)
            {
                this.treasureChestHorde.SetActive(true);
                this.treasureChestAlliance.SetActive(false);
            }
            else
            {
                this.treasureChestHorde.SetActive(false);
                this.treasureChestAlliance.SetActive(true);
            }
        }
        JamGarrisonMobileMission jamGarrisonMobileMission = (JamGarrisonMobileMission)PersistentMissionData.missionDictionary[garrMissionID];

        this.m_missionStartedTime       = jamGarrisonMobileMission.StartTime;
        this.m_missionDurationInSeconds = jamGarrisonMobileMission.MissionDuration;
        for (int k = 0; k < jamGarrisonMobileMission.Encounter.Length; k++)
        {
            GameObject gameObject = Object.Instantiate <GameObject>(this.missionEncounterPrefab);
            gameObject.transform.SetParent(this.enemyPortraitsGroup.transform, false);
            MissionEncounter component = gameObject.GetComponent <MissionEncounter>();
            int garrMechanicID         = (jamGarrisonMobileMission.Encounter[k].MechanicID.Length <= 0) ? 0 : jamGarrisonMobileMission.Encounter[k].MechanicID[0];
            component.SetEncounter(jamGarrisonMobileMission.Encounter[k].EncounterID, garrMechanicID);
        }
        this.missionNameText.text     = record.Name;
        this.missionLocationText.text = record.Location;
        this.missioniLevelText.text   = StaticDB.GetString("ITEM_LEVEL_ABBREVIATION", null) + " " + record.TargetItemLevel;
        GarrMissionTypeRec record2 = StaticDB.garrMissionTypeDB.GetRecord((int)record.GarrMissionTypeID);

        this.missionTypeImage.overrideSprite = TextureAtlas.instance.GetAtlasSprite((int)record2.UiTextureAtlasMemberID);
        if (this.missionFollowerSlotGroup != null)
        {
            int num = 0;
            while ((long)num < (long)((ulong)record.MaxFollowers))
            {
                GameObject gameObject2 = Object.Instantiate <GameObject>(this.missionFollowerSlotPrefab);
                gameObject2.transform.SetParent(this.missionFollowerSlotGroup.transform, false);
                MissionFollowerSlot component2 = gameObject2.GetComponent <MissionFollowerSlot>();
                component2.m_enemyPortraitsGroup = this.enemyPortraitsGroup;
                num++;
            }
        }
        if (record.UiTextureKitID > 0u)
        {
            UiTextureKitRec record3 = StaticDB.uiTextureKitDB.GetRecord((int)record.UiTextureKitID);
            this.m_scrollingEnvironment_Back.enabled = false;
            this.m_scrollingEnvironment_Mid.enabled  = false;
            this.m_scrollingEnvironment_Fore.enabled = false;
            int uitextureAtlasMemberID = TextureAtlas.GetUITextureAtlasMemberID("_" + record3.KitPrefix + "-Back");
            if (uitextureAtlasMemberID > 0)
            {
                Sprite atlasSprite = TextureAtlas.instance.GetAtlasSprite(uitextureAtlasMemberID);
                if (atlasSprite != null)
                {
                    this.m_scrollingEnvironment_Back.enabled = true;
                    this.m_scrollingEnvironment_Back.sprite  = atlasSprite;
                }
            }
            int uitextureAtlasMemberID2 = TextureAtlas.GetUITextureAtlasMemberID("_" + record3.KitPrefix + "-Mid");
            if (uitextureAtlasMemberID2 > 0)
            {
                Sprite atlasSprite2 = TextureAtlas.instance.GetAtlasSprite(uitextureAtlasMemberID2);
                if (atlasSprite2 != null)
                {
                    this.m_scrollingEnvironment_Mid.enabled = true;
                    this.m_scrollingEnvironment_Mid.sprite  = atlasSprite2;
                }
            }
            int uitextureAtlasMemberID3 = TextureAtlas.GetUITextureAtlasMemberID("_" + record3.KitPrefix + "-Fore");
            if (uitextureAtlasMemberID3 > 0)
            {
                Sprite atlasSprite3 = TextureAtlas.instance.GetAtlasSprite(uitextureAtlasMemberID3);
                if (atlasSprite3 != null)
                {
                    this.m_scrollingEnvironment_Fore.enabled = true;
                    this.m_scrollingEnvironment_Fore.sprite  = atlasSprite3;
                }
            }
        }
        else
        {
            Debug.LogWarning(string.Concat(new object[]
            {
                "DATA ERROR: Mission UITextureKit Not Set for mission ID:",
                record.ID,
                " - ",
                record.Name
            }));
            Debug.LogWarning("This means the scrolling background images will show the wrong location");
        }
        if (this.m_lootGroupObj == null || this.m_missionRewardDisplayPrefab == null)
        {
            return;
        }
        MissionRewardDisplay[] componentsInChildren3 = this.m_lootGroupObj.GetComponentsInChildren <MissionRewardDisplay>(true);
        for (int l = 0; l < componentsInChildren3.Length; l++)
        {
            if (componentsInChildren3[l] != null)
            {
                Object.DestroyImmediate(componentsInChildren3[l].gameObject);
            }
        }
        if (missionResultType == 1)
        {
            PersistentFollowerData.ClearPreMissionFollowerData();
        }
        List <JamGarrisonFollower> list = new List <JamGarrisonFollower>();

        MissionFollowerSlot[] componentsInChildren4 = this.missionFollowerSlotGroup.GetComponentsInChildren <MissionFollowerSlot>(true);
        int num2 = 0;

        foreach (JamGarrisonFollower jamGarrisonFollower in PersistentFollowerData.followerDictionary.Values)
        {
            if (jamGarrisonFollower.CurrentMissionID == garrMissionID)
            {
                componentsInChildren4[num2++].SetFollower(jamGarrisonFollower.GarrFollowerID);
                if (missionResultType == 1)
                {
                    PersistentFollowerData.CachePreMissionFollower(jamGarrisonFollower);
                }
                list.Add(jamGarrisonFollower);
            }
        }
        this.UpdateMissionStatus(garrMissionID);
        foreach (MissionFollowerSlot missionFollowerSlot in componentsInChildren4)
        {
            missionFollowerSlot.InitHeartPanel();
        }
        MissionRewardDisplay.InitMissionRewards(this.m_missionRewardDisplayPrefab.gameObject, this.m_lootGroupObj.transform, jamGarrisonMobileMission.Reward);
        if (record.OvermaxRewardPackID > 0 && jamGarrisonMobileMission.OvermaxReward.Length > 0)
        {
            this.m_bonusLootDisplay.SetActive(true);
            JamGarrisonMissionReward jamGarrisonMissionReward = jamGarrisonMobileMission.OvermaxReward[0];
            if (jamGarrisonMissionReward.ItemID > 0)
            {
                this.m_bonusMissionRewardDisplay.InitReward(MissionRewardDisplay.RewardType.item, jamGarrisonMissionReward.ItemID, (int)jamGarrisonMissionReward.ItemQuantity, 0, jamGarrisonMissionReward.ItemFileDataID);
            }
            else if (jamGarrisonMissionReward.FollowerXP > 0u)
            {
                this.m_bonusMissionRewardDisplay.InitReward(MissionRewardDisplay.RewardType.followerXP, 0, (int)jamGarrisonMissionReward.FollowerXP, 0, 0);
            }
            else if (jamGarrisonMissionReward.CurrencyQuantity > 0u)
            {
                if (jamGarrisonMissionReward.CurrencyType == 0)
                {
                    this.m_bonusMissionRewardDisplay.InitReward(MissionRewardDisplay.RewardType.gold, 0, (int)(jamGarrisonMissionReward.CurrencyQuantity / 10000u), 0, 0);
                }
                else
                {
                    CurrencyTypesRec record4 = StaticDB.currencyTypesDB.GetRecord(jamGarrisonMissionReward.CurrencyType);
                    int rewardQuantity       = (int)((ulong)jamGarrisonMissionReward.CurrencyQuantity / (ulong)(((record4.Flags & 8u) == 0u) ? 1L : 100L));
                    this.m_bonusMissionRewardDisplay.InitReward(MissionRewardDisplay.RewardType.currency, jamGarrisonMissionReward.CurrencyType, rewardQuantity, 0, 0);
                }
            }
        }
        this.m_timeUntilFadeOutMissionDetailsDisplay   = this.m_missionDetailsFadeOutDelay;
        this.m_timeUntilShowFollowerExperienceDisplays = this.m_experienceDisplayInitialEntranceDelay;
        if (missionResultType == 2)
        {
            this.InitFollowerExperienceDisplays();
            this.m_missionInProgressMessage.SetActive(false);
            this.m_missionSuccessMessage.SetActive(true);
            this.m_missionFailMessage.SetActive(false);
            if (this.m_fancyEntrance != null)
            {
                Object.DestroyImmediate(this.m_fancyEntrance);
                iTween.Stop(this.m_missionSuccessMessage);
                this.m_missionSuccessMessage.transform.localScale = Vector3.one;
                iTween.Stop(this.m_missionFailMessage);
                this.m_missionFailMessage.transform.localScale = Vector3.one;
            }
            this.m_missionSuccessMessage.SetActive(false);
            this.m_fancyEntrance = this.m_missionSuccessMessage.AddComponent <FancyEntrance>();
            this.m_fancyEntrance.m_fadeInCanvasGroup         = this.m_missionSuccessMessage.GetComponent <CanvasGroup>();
            this.m_fancyEntrance.m_fadeInTime                = this.m_messageFadeInTime;
            this.m_fancyEntrance.m_punchScale                = this.m_messagePunchScale;
            this.m_fancyEntrance.m_punchScaleAmount          = this.m_messagePunchScaleAmount;
            this.m_fancyEntrance.m_punchScaleDuration        = this.m_messagePunchScaleDuration;
            this.m_fancyEntrance.m_timeToDelayEntrance       = this.m_messageTimeToDelayEntrance;
            this.m_fancyEntrance.m_activateOnEnable          = true;
            this.m_fancyEntrance.m_objectToNotifyOnBegin     = base.gameObject;
            this.m_fancyEntrance.m_notifyOnBeginCallbackName = "OnShowSuccessMessage";
            this.m_missionSuccessMessage.SetActive(true);
            MissionRewardDisplay[] componentsInChildren5 = this.m_lootGroupObj.GetComponentsInChildren <MissionRewardDisplay>(true);
            for (int n = 0; n < componentsInChildren5.Length; n++)
            {
                componentsInChildren5[n].ShowResultSuccess(this.m_lootEffectInitialDelay + this.m_lootEffectDelay * (float)n);
            }
            if (this.m_bonusLootChance > 0)
            {
                iTween.ValueTo(base.gameObject, iTween.Hash(new object[]
                {
                    "name",
                    "ShakeIt",
                    "from",
                    0.3f,
                    "to",
                    1f,
                    "delay",
                    this.m_bonusLootShakeInitialDelay,
                    "time",
                    this.m_bonusLootShakeDuration,
                    "onupdate",
                    "OnBonusLootShakeUpdate",
                    "oncomplete",
                    "OnBonusLootShakeComplete"
                }));
            }
            if (awardOvermax)
            {
                this.m_bonusMissionRewardDisplay.ShowResultSuccess(this.m_lootEffectInitialDelay + this.m_lootEffectDelay * (float)componentsInChildren5.Length);
            }
            else
            {
                this.m_bonusMissionRewardDisplay.ShowResultFail(this.m_lootEffectInitialDelay + this.m_lootEffectDelay * (float)componentsInChildren5.Length);
            }
        }
        if (missionResultType == 3)
        {
            this.InitFollowerExperienceDisplays();
            this.m_missionInProgressMessage.SetActive(false);
            this.m_missionSuccessMessage.SetActive(false);
            this.m_missionFailMessage.SetActive(true);
            if (this.m_fancyEntrance != null)
            {
                Object.DestroyImmediate(this.m_fancyEntrance);
                iTween.Stop(this.m_missionSuccessMessage);
                this.m_missionSuccessMessage.transform.localScale = Vector3.one;
                iTween.Stop(this.m_missionFailMessage);
                this.m_missionFailMessage.transform.localScale = Vector3.one;
            }
            this.m_missionFailMessage.SetActive(false);
            this.m_fancyEntrance = this.m_missionFailMessage.AddComponent <FancyEntrance>();
            this.m_fancyEntrance.m_fadeInCanvasGroup         = this.m_missionFailMessage.GetComponent <CanvasGroup>();
            this.m_fancyEntrance.m_fadeInTime                = this.m_messageFadeInTime;
            this.m_fancyEntrance.m_punchScale                = this.m_messagePunchScale;
            this.m_fancyEntrance.m_punchScaleAmount          = this.m_messagePunchScaleAmount;
            this.m_fancyEntrance.m_punchScaleDuration        = this.m_messagePunchScaleDuration;
            this.m_fancyEntrance.m_timeToDelayEntrance       = this.m_messageTimeToDelayEntrance;
            this.m_fancyEntrance.m_activateOnEnable          = true;
            this.m_fancyEntrance.m_objectToNotifyOnBegin     = base.gameObject;
            this.m_fancyEntrance.m_notifyOnBeginCallbackName = "OnShowFailMessage";
            this.m_missionFailMessage.SetActive(true);
            MissionRewardDisplay[] componentsInChildren6 = this.m_lootGroupObj.GetComponentsInChildren <MissionRewardDisplay>(true);
            for (int num3 = 0; num3 < componentsInChildren6.Length; num3++)
            {
                componentsInChildren6[num3].ShowResultFail(this.m_lootEffectInitialDelay);
            }
            this.m_bonusMissionRewardDisplay.ShowResultFail(this.m_lootEffectInitialDelay);
        }
        if (missionResultType == 0)
        {
            this.m_missionInProgressMessage.SetActive(true);
            this.m_missionSuccessMessage.SetActive(false);
            this.m_missionFailMessage.SetActive(false);
            this.m_bonusMissionRewardDisplay.ClearResults();
        }
        if (missionResultType == 1)
        {
            this.m_missionInProgressMessage.SetActive(false);
            this.m_missionSuccessMessage.SetActive(false);
            this.m_missionFailMessage.SetActive(false);
            FollowerExperienceDisplay[] componentsInChildren7 = this.m_followerExperienceDisplayArea.GetComponentsInChildren <FollowerExperienceDisplay>(true);
            foreach (FollowerExperienceDisplay followerExperienceDisplay in componentsInChildren7)
            {
                Object.DestroyImmediate(followerExperienceDisplay.gameObject);
            }
        }
        if (this.m_partyBuffGroup == null)
        {
            return;
        }
        AbilityDisplay[] componentsInChildren8 = this.m_partyBuffGroup.GetComponentsInChildren <AbilityDisplay>(true);
        foreach (AbilityDisplay abilityDisplay in componentsInChildren8)
        {
            Object.DestroyImmediate(abilityDisplay.gameObject);
        }
        int adjustedMissionDuration = GeneralHelpers.GetAdjustedMissionDuration(record, list, this.enemyPortraitsGroup);
        int num6 = 0;

        foreach (JamGarrisonFollower jamGarrisonFollower2 in PersistentFollowerData.followerDictionary.Values)
        {
            if (jamGarrisonFollower2.CurrentMissionID == garrMissionID)
            {
                int[] buffsForCurrentMission = GeneralHelpers.GetBuffsForCurrentMission(jamGarrisonFollower2.GarrFollowerID, garrMissionID, this.missionFollowerSlotGroup, adjustedMissionDuration);
                num6 += buffsForCurrentMission.Length;
                foreach (int garrAbilityID in buffsForCurrentMission)
                {
                    GameObject gameObject3 = Object.Instantiate <GameObject>(this.m_mechanicEffectDisplayPrefab);
                    gameObject3.transform.SetParent(this.m_partyBuffGroup.transform, false);
                    AbilityDisplay component3 = gameObject3.GetComponent <AbilityDisplay>();
                    component3.SetAbility(garrAbilityID, false, false, null);
                }
            }
        }
        if (num6 > 8)
        {
            this.m_partyBuffsText.text = string.Empty;
        }
        else
        {
            this.m_partyBuffsText.text = StaticDB.GetString("PARTY_BUFFS", null);
        }
        HorizontalLayoutGroup component4 = this.m_partyBuffGroup.GetComponent <HorizontalLayoutGroup>();

        if (component4 != null)
        {
            if (num6 > 10 && Main.instance.IsNarrowScreen())
            {
                component4.spacing = 3f;
            }
            else
            {
                component4.spacing = 6f;
            }
        }
        this.m_partyBuffGroup.SetActive(num6 > 0);
    }
    public void SetTalent(TalentTreeItemAbilityButton abilityButton)
    {
        this.m_abilityButton = abilityButton;
        this.m_garrTalentRec = StaticDB.garrTalentDB.GetRecord(abilityButton.GetTalentID());
        this.m_talentName.set_text(this.m_garrTalentRec.Name);
        this.m_talentDescription.set_text(WowTextParser.parser.Parse(this.m_garrTalentRec.Description, 0));
        this.m_talentDescription.set_supportRichText(WowTextParser.parser.IsRichText());
        Sprite sprite = GeneralHelpers.LoadIconAsset(AssetBundleType.Icons, this.m_garrTalentRec.IconFileDataID);

        if (sprite != null)
        {
            this.m_abilityIcon.set_sprite(sprite);
        }
        this.m_researchTimeAndCostSection.SetActive(false);
        int num = (!abilityButton.CanRespec()) ? this.m_garrTalentRec.ResearchCost : this.m_garrTalentRec.RespecCost;

        this.m_resourceCostText.set_text(((GarrisonStatus.Resources() >= num) ? "<color=#ffffffff>" : "<color=#FF0000FF>") + ((!abilityButton.CanRespec()) ? this.m_garrTalentRec.ResearchCost : this.m_garrTalentRec.RespecCost) + "</color>");
        Sprite sprite2 = GeneralHelpers.LoadCurrencyIcon((int)this.m_garrTalentRec.ResearchCostCurrencyTypesID);

        if (sprite2 != null)
        {
            this.m_resourceIcon.set_sprite(sprite2);
        }
        Duration duration = new Duration((!abilityButton.CanRespec()) ? this.m_garrTalentRec.ResearchDurationSecs : this.m_garrTalentRec.RespecDurationSecs, false);

        this.m_researchDurationText.set_text(duration.DurationString);
        this.m_yourResourcesDisplayObj.SetActive(false);
        if (abilityButton.CanResearch() || abilityButton.CanRespec())
        {
            this.m_availableForResearchSection.SetActive(true);
            this.m_unavailableForResearchSection.SetActive(false);
            this.m_researchOrRespecText.set_text((!abilityButton.CanRespec()) ? StaticDB.GetString("RESEARCH", null) : StaticDB.GetString("RESPEC", null));
            this.m_yourResourcesDisplayObj.SetActive(true);
            this.m_researchTimeAndCostSection.SetActive(true);
        }
        else
        {
            this.m_availableForResearchSection.SetActive(false);
            this.m_unavailableForResearchSection.SetActive(true);
            if (this.m_abilityButton.IsOwned())
            {
                this.m_yourResourcesDisplayObj.SetActive(false);
                this.m_statusText.set_text("<color=#ffffffff>" + StaticDB.GetString("TALENT_OWNED", null) + "</color>");
            }
            else if (this.m_abilityButton.IsResearching())
            {
                Duration duration2 = new Duration((!abilityButton.IsRespec()) ? ((int)this.m_abilityButton.GetRemainingResearchTime()) : ((int)this.m_abilityButton.GetRemainingRespecTime()), false);
                this.m_statusText.set_text(string.Concat(new string[]
                {
                    "<color=#FFC600FF>",
                    StaticDB.GetString("TIME_LEFT", null),
                    "</color> <color=#ffffffff>",
                    duration2.DurationString,
                    "</color>"
                }));
            }
            else if (GarrisonStatus.Resources() < num)
            {
                this.m_researchTimeAndCostSection.SetActive(true);
                this.m_yourResourcesDisplayObj.SetActive(true);
                this.m_statusText.set_text("<color=#FF0000FF>" + StaticDB.GetString("NEED_MORE_RESOURCES", null) + "</color>");
            }
            else if (this.m_talentTreePanel.AnyTalentIsResearching())
            {
                this.m_statusText.set_text("<color=#FF0000FF>" + StaticDB.GetString("ALREADY_RESEARCHING", null) + "</color>");
            }
            else
            {
                string whyCantResearch = this.m_abilityButton.GetWhyCantResearch();
                if (whyCantResearch != null && whyCantResearch != string.Empty)
                {
                    this.m_statusText.set_text("<color=#FF0000FF>" + whyCantResearch + "</color>");
                }
                else
                {
                    this.m_statusText.set_text("<color=#FF0000FF>" + StaticDB.GetString("MUST_RESEARCH_PREVIOUS_TIER", null) + "</color>");
                }
            }
        }
    }
 private void Update()
 {
     if (this.m_mission.MissionState == 1)
     {
         long num  = GarrisonStatus.CurrentTime() - this.m_mission.StartTime;
         long num2 = this.m_mission.MissionDuration - num;
         num2 = ((num2 <= 0L) ? 0L : num2);
         Duration duration = new Duration((int)num2);
         if (num2 > 0L)
         {
             this.m_statusText.set_text(duration.DurationString + " <color=#ff0000ff>(" + StaticDB.GetString("IN_PROGRESS", null) + ")</color>");
         }
         else
         {
             this.m_statusText.set_text("<color=#00ff00ff>(" + StaticDB.GetString("TAP_TO_COMPLETE", null) + ")</color>");
         }
     }
 }
 public static void ScheduleWorkOrderReadyNotification(string workOrderName, int badgeNumber, long secondsFromNow)
 {
     if (secondsFromNow < 0L)
     {
         return;
     }
     NotificationManager.SendWithAppIcon(TimeSpan.FromSeconds((double)secondsFromNow), StaticDB.GetString("READY_FOR_PICKUP", null), workOrderName, Color.black, NotificationIcon.WorkOrder);
 }
 public static void ScheduleTalentResearchCompleteNotification(string talentName, int badgeNumber, long secondsFromNow)
 {
     if (secondsFromNow < 0L)
     {
         return;
     }
     NotificationManager.SendWithAppIcon(TimeSpan.FromSeconds((double)secondsFromNow), StaticDB.GetString("RESEARCH_COMPLETE", null), talentName, Color.black, NotificationIcon.Talent);
 }
示例#9
0
 public void OnAssetBundleManagerInitialized()
 {
     this.SetConnectingPanelStatus(StaticDB.GetString("CONNECTING", null));
 }
 public static void ScheduleMissionCompleteNotification(string missionName, int badgeNumber, long secondsFromNow)
 {
     if (secondsFromNow < 0L)
     {
         return;
     }
     NotificationManager.SendWithAppIcon(TimeSpan.FromSeconds((double)secondsFromNow), StaticDB.GetString("MISSION_COMPLETE2", null), missionName, Color.black, NotificationIcon.Mission);
 }
示例#11
0
 private void Start()
 {
     this.m_rewardsLabel.font = GeneralHelpers.LoadStandardFont();
     this.m_rewardsLabel.text = StaticDB.GetString("REWARDS", "Rewards");
     this.m_timeLeftString    = StaticDB.GetString("TIME_LEFT", "Time Left: PH");
 }
    public void SetEquipment(MobileFollowerEquipment item, FollowerDetailView followerDetailView, int abilityToReplace)
    {
        this.m_abilityToReplace   = abilityToReplace;
        this.m_equipmentItem      = item;
        this.m_followerDetailView = followerDetailView;
        ItemRec record = StaticDB.itemDB.GetRecord(item.ItemID);

        this.m_equipmentName.set_text(GeneralHelpers.GetItemQualityColorTag(record.OverallQualityID) + record.Display + "</color>");
        GarrAbilityRec record2 = StaticDB.garrAbilityDB.GetRecord(item.GarrAbilityID);

        if (record2 != null)
        {
            this.m_equipmentDescription.set_text(record2.Description);
        }
        else
        {
            SpellTooltipRec record3 = StaticDB.spellTooltipDB.GetRecord(item.SpellID);
            if (record3 != null)
            {
                this.m_equipmentDescription.set_text(record3.Description);
            }
            else
            {
                this.m_equipmentDescription.set_text(string.Concat(new object[]
                {
                    "ERROR. Ability ID:",
                    item.GarrAbilityID,
                    " Spell ID: ",
                    item.SpellID,
                    " Item ID:",
                    item.ItemID
                }));
            }
        }
        this.m_equipmentDescription.set_text(WowTextParser.parser.Parse(this.m_equipmentDescription.get_text(), 0));
        this.m_equipmentDescription.set_supportRichText(WowTextParser.parser.IsRichText());
        if (this.m_iconErrorText != null)
        {
            this.m_iconErrorText.get_gameObject().SetActive(false);
        }
        Sprite sprite = GeneralHelpers.LoadIconAsset(AssetBundleType.Icons, record.IconFileDataID);

        if (sprite != null)
        {
            this.m_equipmentIcon.set_sprite(sprite);
        }
        else if (this.m_iconErrorText != null)
        {
            this.m_iconErrorText.get_gameObject().SetActive(true);
            this.m_iconErrorText.set_text(string.Empty + record.IconFileDataID);
        }
        this.m_equipmentQuantity.set_text((item.Quantity <= 1) ? string.Empty : (string.Empty + item.Quantity));
        JamGarrisonFollower jamGarrisonFollower = PersistentFollowerData.followerDictionary.get_Item(this.m_followerDetailView.GetCurrentFollower());

        if (jamGarrisonFollower != null && jamGarrisonFollower.CurrentMissionID != 0)
        {
            this.m_useItemButtonLabel.set_text(StaticDB.GetString("ON_MISSION", null));
            this.m_useItemButtonLabel.set_color(new Color(0.5f, 0.5f, 0.5f, 1f));
            this.m_useItemButton.set_interactable(false);
        }
        else
        {
            this.m_useItemButtonLabel.set_text(StaticDB.GetString("USE_ITEM", null));
        }
    }
    private void SetFollowerAppearance(JamGarrisonFollower follower, bool nextCapIsForQuality, bool isMaxLevelAndMaxQuality, bool isTroop, float initialEntranceDelay)
    {
        GarrFollowerRec record = StaticDB.garrFollowerDB.GetRecord(follower.GarrFollowerID);

        this.m_troopHeartContainerEmpty.SetActive(isTroop);
        this.m_troopHeartContainerFull.SetActive(isTroop);
        this.m_expiredPortraitX.SetActive(false);
        if (isTroop)
        {
            this.m_levelBorder.get_gameObject().SetActive(false);
            this.m_progressBarObj.SetActive(false);
            this.m_portraitBG.get_gameObject().SetActive(false);
            this.m_troopHeartContainerEmpty.SetActive(true);
            this.m_troopHeartContainerFull.SetActive(true);
            Transform[] componentsInChildren = this.m_troopHeartContainerEmpty.GetComponentsInChildren <Transform>();
            Transform[] array = componentsInChildren;
            for (int i = 0; i < array.Length; i++)
            {
                Transform transform = array[i];
                if (transform != this.m_troopHeartContainerEmpty.get_transform())
                {
                    Object.DestroyImmediate(transform.get_gameObject());
                }
            }
            Transform[] componentsInChildren2 = this.m_troopHeartContainerFull.GetComponentsInChildren <Transform>();
            Transform[] array2 = componentsInChildren2;
            for (int j = 0; j < array2.Length; j++)
            {
                Transform transform2 = array2[j];
                if (transform2 != this.m_troopHeartContainerFull.get_transform())
                {
                    Object.DestroyImmediate(transform2.get_gameObject());
                }
            }
            float num = 0.15f;
            JamGarrisonFollower jamGarrisonFollower = PersistentFollowerData.preMissionFollowerDictionary.get_Item(follower.GarrFollowerID);
            for (int k = 0; k < jamGarrisonFollower.Durability; k++)
            {
                GameObject gameObject = Object.Instantiate <GameObject>(this.m_troopHeartPrefab);
                gameObject.get_transform().SetParent(this.m_troopHeartContainerFull.get_transform(), false);
                if (k >= follower.Durability)
                {
                    float num2 = initialEntranceDelay + (float)(jamGarrisonFollower.Durability - (k - follower.Durability)) * num;
                    float num3 = 2f;
                    iTween.ValueTo(gameObject, iTween.Hash(new object[]
                    {
                        "name",
                        "fade",
                        "from",
                        0f,
                        "to",
                        1f,
                        "time",
                        num3,
                        "easetype",
                        iTween.EaseType.easeOutCubic,
                        "delay",
                        num2,
                        "onupdatetarget",
                        gameObject,
                        "onupdate",
                        "SetHeartEffectProgress",
                        "oncomplete",
                        "FinishHeartEffect"
                    }));
                }
            }
            for (int l = 0; l < record.Vitality; l++)
            {
                GameObject gameObject2 = Object.Instantiate <GameObject>(this.m_troopEmptyHeartPrefab);
                gameObject2.get_transform().SetParent(this.m_troopHeartContainerEmpty.get_transform(), false);
            }
            if (follower.Durability <= 0)
            {
                DelayedUIAnim delayedUIAnim = base.get_gameObject().AddComponent <DelayedUIAnim>();
                float         num4          = initialEntranceDelay + (float)(jamGarrisonFollower.Durability - follower.Durability) * num + 1f;
                delayedUIAnim.Init(num4, "RedFailX", "SFX/UI_Mission_Fail_Red_X", this.m_followerPortrait.get_transform(), 1.5f);
                DelayedObjectEnable delayedObjectEnable = base.get_gameObject().AddComponent <DelayedObjectEnable>();
                delayedObjectEnable.Init(num4 + 0.25f, this.m_expiredPortraitX);
            }
        }
        int    iconFileDataID = (GarrisonStatus.Faction() != PVP_FACTION.HORDE) ? record.AllianceIconFileDataID : record.HordeIconFileDataID;
        Sprite sprite         = GeneralHelpers.LoadIconAsset(AssetBundleType.PortraitIcons, iconFileDataID);

        if (sprite != null)
        {
            this.m_followerPortrait.set_sprite(sprite);
        }
        if (isTroop)
        {
            this.m_qualityBorder.get_gameObject().SetActive(false);
            this.m_levelBorder.get_gameObject().SetActive(false);
            this.m_followerNameText.set_color(Color.get_white());
        }
        else
        {
            Color qualityColor = GeneralHelpers.GetQualityColor(follower.Quality);
            this.m_qualityBorder.set_color(qualityColor);
            this.m_levelBorder.set_color(qualityColor);
            this.m_followerNameText.set_color(qualityColor);
        }
        CreatureRec record2 = StaticDB.creatureDB.GetRecord((GarrisonStatus.Faction() != PVP_FACTION.HORDE) ? record.AllianceCreatureID : record.HordeCreatureID);

        this.m_followerNameText.set_text(record2.Name);
        int num5 = (follower.ItemLevelWeapon + follower.ItemLevelArmor) / 2;

        if (this.m_iLvlString == null)
        {
            this.m_iLvlString = StaticDB.GetString("ITEM_LEVEL_ABBREVIATION", null);
        }
        this.m_iLevelText.set_text(this.m_iLvlString + " " + num5);
        GarrClassSpecRec record3 = StaticDB.garrClassSpecDB.GetRecord((int)((GarrisonStatus.Faction() != PVP_FACTION.HORDE) ? record.AllianceGarrClassSpecID : record.HordeGarrClassSpecID));

        this.m_classText.set_text(record3.ClassSpec);
        Sprite atlasSprite = TextureAtlas.instance.GetAtlasSprite((int)record3.UiTextureAtlasMemberID);

        if (atlasSprite != null)
        {
            this.m_classIcon.set_sprite(atlasSprite);
        }
        if (!isTroop)
        {
            if (isMaxLevelAndMaxQuality)
            {
                this.m_progressBarObj.SetActive(false);
                this.m_toNextLevelOrUpgradeText.set_text(string.Empty);
            }
            else if (nextCapIsForQuality)
            {
                this.m_progressBarObj.SetActive(true);
                this.m_toNextLevelOrUpgradeText.set_text(StaticDB.GetString("TO_NEXT_UPGRADE", string.Empty));
            }
            else
            {
                this.m_progressBarObj.SetActive(true);
                this.m_toNextLevelOrUpgradeText.set_text(StaticDB.GetString("TO_NEXT_LEVEL", string.Empty));
            }
        }
    }
示例#14
0
 private void Awake()
 {
     this.m_noRecruitsYetMessage.font = GeneralHelpers.LoadStandardFont();
     this.m_noRecruitsYetMessage.text = StaticDB.GetString("NO_RECRUITS_AVAILABLE_YET", "You have no recruits available yet.");
     this.InitList();
 }
示例#15
0
    public void InitReward(MissionRewardDisplay.RewardType rewardType, int rewardID, int rewardQuantity, int itemContext, int iconFileDataID = 0)
    {
        if (rewardType == MissionRewardDisplay.RewardType.faction)
        {
            return;
        }
        this.ClearResults();
        this.m_rewardType     = rewardType;
        this.m_rewardID       = rewardID;
        this.m_rewardQuantity = rewardQuantity;
        this.m_itemContext    = itemContext;
        if (this.m_iconErrorText != null)
        {
            this.m_iconErrorText.get_gameObject().SetActive(false);
        }
        switch (this.m_rewardType)
        {
        case MissionRewardDisplay.RewardType.item:
        {
            Sprite sprite = GeneralHelpers.LoadIconAsset(AssetBundleType.Icons, iconFileDataID);
            if (sprite != null)
            {
                this.m_rewardIcon.set_sprite(sprite);
            }
            else if (this.m_iconErrorText != null)
            {
                this.m_iconErrorText.get_gameObject().SetActive(true);
                this.m_iconErrorText.set_text(string.Empty + iconFileDataID);
            }
            if (this.m_rewardName != null)
            {
                ItemRec record = StaticDB.itemDB.GetRecord(this.m_rewardID);
                if (record != null)
                {
                    this.m_rewardName.set_text(record.Display);
                    this.m_rewardName.set_color(GeneralHelpers.GetQualityColor(record.OverallQualityID));
                }
                else
                {
                    this.m_rewardName.set_text("Unknown Item " + this.m_rewardID);
                }
            }
            if (this.m_isExpandedDisplay)
            {
                this.m_rewardQuantityText.set_text((this.m_rewardQuantity <= 1) ? string.Empty : this.m_rewardQuantity.ToString("N0"));
            }
            break;
        }

        case MissionRewardDisplay.RewardType.gold:
            this.m_rewardIcon.set_sprite(Resources.Load <Sprite>("MiscIcons/INV_Misc_Coin_01"));
            if (this.m_isExpandedDisplay)
            {
                this.m_rewardQuantityText.set_text(string.Empty);
                this.m_rewardName.set_text((this.m_rewardQuantity <= 1) ? string.Empty : this.m_rewardQuantity.ToString("N0"));
            }
            break;

        case MissionRewardDisplay.RewardType.followerXP:
            this.m_rewardIcon.set_sprite(GeneralHelpers.GetLocalizedFollowerXpIcon());
            this.m_rewardQuantityText.set_text(string.Empty);
            if (this.m_rewardName != null && this.m_isExpandedDisplay)
            {
                this.m_rewardName.set_text((this.m_rewardQuantity <= 1) ? string.Empty : (this.m_rewardQuantity.ToString("N0") + " " + StaticDB.GetString("XP2", "XP")));
            }
            break;

        case MissionRewardDisplay.RewardType.currency:
        {
            Sprite sprite2 = GeneralHelpers.LoadCurrencyIcon(this.m_rewardID);
            if (sprite2 != null)
            {
                this.m_rewardIcon.set_sprite(sprite2);
            }
            else
            {
                this.m_iconErrorText.get_gameObject().SetActive(true);
                this.m_iconErrorText.set_text("c " + this.m_rewardID);
            }
            if (this.m_isExpandedDisplay)
            {
                CurrencyTypesRec record2 = StaticDB.currencyTypesDB.GetRecord(rewardID);
                if (record2 != null)
                {
                    this.m_rewardName.set_text(record2.Name);
                }
                else
                {
                    this.m_rewardName.set_text(string.Empty);
                }
                this.m_rewardQuantityText.set_text((this.m_rewardQuantity <= 1) ? string.Empty : this.m_rewardQuantity.ToString("N0"));
            }
            break;
        }
        }
        if (!this.m_isExpandedDisplay)
        {
            this.m_rewardQuantityText.set_text((this.m_rewardQuantity <= 1) ? string.Empty : this.m_rewardQuantity.ToString("N0"));
        }
    }