Beispiel #1
0
 private void Awake()
 {
     this.m_gamePanel = base.GetComponentInParent <GamePanel>();
     this.m_noRecruitsYetMessage.font = FontLoader.LoadStandardFont();
     this.m_noRecruitsYetMessage.text = StaticDB.GetString("NO_RECRUITS_AVAILABLE_YET", "You have no recruits available yet.");
     this.InitList();
 }
Beispiel #2
0
 public void OnAssetBundleManagerInitialized()
 {
     if (FollowerListItem.m_inactiveString == null)
     {
         FollowerListItem.m_inactiveString = StaticDB.GetString("INACTIVE", null);
     }
     if (FollowerListItem.m_onMissionString == null)
     {
         FollowerListItem.m_onMissionString = StaticDB.GetString("ON_MISSION", null);
     }
     if (FollowerListItem.m_fatiguedString == null)
     {
         FollowerListItem.m_fatiguedString = StaticDB.GetString("FATIGUED", null);
     }
     if (FollowerListItem.m_inBuildingString == null)
     {
         FollowerListItem.m_inBuildingString = StaticDB.GetString("IN_BUILDING", null);
     }
     if (FollowerListItem.m_inPartyString == null)
     {
         FollowerListItem.m_inPartyString = StaticDB.GetString("IN_PARTY", null);
     }
     if (FollowerListItem.m_missionCompleteString == null)
     {
         FollowerListItem.m_missionCompleteString = StaticDB.GetString("MISSION_COMPLETE", null);
     }
     if (FollowerListItem.m_combatAllyString == null)
     {
         FollowerListItem.m_combatAllyString = StaticDB.GetString("COMBAT_ALLY", null);
     }
 }
Beispiel #3
0
        private void UpdateOnlineStatus()
        {
            if (this.m_enabled)
            {
                this.m_loginButtonNameText.text  = this.m_realmName;
                this.m_loginButtonNameText.color = BnLoginButton.s_enabledColor;
                this.m_numCharactersText.text    = string.Empty + this.m_characterCount;
                this.m_numCharactersText.color   = BnLoginButton.s_enabledCharacterCountColor;
            }
            else
            {
                this.m_loginButtonNameText.text  = this.m_realmName + " (" + StaticDB.GetString("OFFLINE", null) + ")";
                this.m_loginButtonNameText.color = BnLoginButton.s_disabledColor;
                this.m_numCharactersText.text    = string.Empty + this.m_characterCount;
                this.m_numCharactersText.color   = BnLoginButton.s_disabledColor;
            }
            Button component = base.GetComponent <Button>();

            component.interactable = this.m_enabled;
            if (this.m_enabled)
            {
                this.m_realmStatusIcon.sprite = Resources.Load <Sprite>("NewLoginPanel/Realm_StatusGreen");
            }
            else
            {
                this.m_realmStatusIcon.sprite = Resources.Load <Sprite>("NewLoginPanel/Realm_StatusRed");
            }
        }
 public void Show()
 {
     base.gameObject.SetActive(true);
     this.m_areYouSureLabel.text   = StaticDB.GetString("ARE_YOU_SURE", null);
     this.m_cancelButtonLabel.text = StaticDB.GetString("NO", null);
     this.m_okButtonLabel.text     = StaticDB.GetString("YES_UNASSIGN", "Yes, Unassign!");
 }
Beispiel #5
0
        private void ShowILVL()
        {
            ItemRec record = StaticDB.itemDB.GetRecord(this.m_itemID);

            if (record == null)
            {
                Debug.LogWarning(string.Concat(new object[]
                {
                    "Invalid Item ID ",
                    this.m_itemID,
                    " from Quest ID ",
                    this.m_questID,
                    ". Ignoring for showing iLevel on map."
                }));
                return;
            }
            if (AdventureMapPanel.instance.IsFilterEnabled(MapFilterType.Gear) && (record.ClassID == 2 || record.ClassID == 3 || record.ClassID == 4 || record.ClassID == 6))
            {
                WrapperItemStats?itemStats = ItemStatCache.instance.GetItemStats(this.m_itemID, this.m_itemContext);
                if (itemStats != null)
                {
                    this.m_quantityArea.gameObject.SetActive(true);
                    this.m_quantity.text = StaticDB.GetString("ILVL", null) + " " + itemStats.Value.ItemLevel;
                }
                else
                {
                    ItemStatCache instance = ItemStatCache.instance;
                    instance.ItemStatCacheUpdateAction = (Action <int, int, WrapperItemStats>)Delegate.Combine(instance.ItemStatCacheUpdateAction, new Action <int, int, WrapperItemStats>(this.ItemStatsUpdated));
                }
            }
        }
Beispiel #6
0
        public void SetFollower(WrapperGarrisonFollower oldFollower, WrapperGarrisonFollower newFollower, float initialEffectDelay)
        {
            this.m_followerID = oldFollower.GarrFollowerID;
            if ((oldFollower.Flags & 8) != 0)
            {
                this.SetFollowerAppearance(newFollower, false, false, true, initialEffectDelay);
                return;
            }
            this.m_showedLevelUpEffect = false;
            bool flag  = false;
            bool flag1 = false;

            GeneralHelpers.GetXpCapInfo(oldFollower.FollowerLevel, oldFollower.Quality, out this.m_currentCap, out flag1, out flag);
            this.SetFollowerAppearance(oldFollower, flag1, flag, false, initialEffectDelay);
            GeneralHelpers.GetXpCapInfo(newFollower.FollowerLevel, newFollower.Quality, out this.m_newCap, out this.m_newCapIsQuality, out this.m_newFollowerIsMaxLevelAndMaxQuality);
            this.m_fancyNumberDisplay.SetNumberLabel(StaticDB.GetString("XP2", null));
            this.m_fancyNumberDisplay.SetValue((int)(this.m_currentCap - oldFollower.Xp), true, 0f);
            if (oldFollower.FollowerLevel != newFollower.FollowerLevel || oldFollower.Quality != newFollower.Quality)
            {
                this.m_fancyNumberDisplay.SetValue(0, initialEffectDelay);
            }
            else
            {
                this.m_fancyNumberDisplay.SetValue((int)(this.m_currentCap - newFollower.Xp), initialEffectDelay);
            }
        }
 private void Start()
 {
     this.m_titleText.font  = GeneralHelpers.LoadFancyFont();
     this.m_titleText.text  = StaticDB.GetString("REALM_SELECTION", null);
     this.m_cancelText.font = GeneralHelpers.LoadStandardFont();
     this.m_cancelText.text = StaticDB.GetString("CANCEL", null);
 }
Beispiel #8
0
        private void InitPlayerDisplay(int playerLevel)
        {
            this.m_characterName.text = Singleton <CharacterData> .instance.CharacterName;
            if (Main.instance.GetLocale() == "frFR")
            {
                this.m_characterClassName.text = string.Concat(new string[]
                {
                    GarrisonStatus.CharacterClassName(),
                    " ",
                    StaticDB.GetString("LEVEL", null),
                    " ",
                    playerLevel.ToString()
                });
            }
            else
            {
                this.m_characterClassName.text = GeneralHelpers.TextOrderString(StaticDB.GetString("LEVEL", null), playerLevel.ToString()) + " " + GarrisonStatus.CharacterClassName();
            }
            this.m_characterListButton.text = StaticDB.GetString("CHARACTER_LIST", null);
            Sprite sprite = GeneralHelpers.LoadClassIcon(new uint?((uint)GarrisonStatus.CharacterClassID()));

            if (sprite != null)
            {
                this.m_classIcon.sprite = sprite;
            }
        }
Beispiel #9
0
        private void UpdateTimeRemaining()
        {
            TimeSpan endTime = this.m_bounty.EndTime - GarrisonStatus.CurrentTime();

            endTime = (endTime.TotalSeconds <= 0 ? TimeSpan.Zero : endTime);
            this.m_timeLeft.text = string.Concat(StaticDB.GetString("TIME_LEFT", "Time Left: PH"), " ", endTime.GetDurationString(false));
        }
Beispiel #10
0
        public void AddCharacterButton(JamJSONCharacterEntry charData, string subRegion, string realmName, bool online)
        {
            this.m_characterEntry = charData;
            GameObject gameObject = Object.Instantiate <GameObject>(this.charListItemPrefab);

            gameObject.transform.SetParent(this.charListContents.transform, false);
            CharacterListButton component = gameObject.GetComponent <CharacterListButton>();

            component.SetGUID(charData.PlayerGuid);
            component.m_characterEntry = charData;
            component.m_subRegion      = subRegion;
            Sprite sprite = GeneralHelpers.LoadClassIcon((int)charData.ClassID);

            if (sprite != null)
            {
                component.m_characterClassIcon.sprite = sprite;
            }
            component.m_characterName.text = charData.Name;
            bool flag = online;

            if (!charData.HasMobileAccess)
            {
                component.m_subtext.text  = StaticDB.GetString("REQUIRES_CLASS_HALL", null);
                component.m_subtext.color = Color.red;
                flag = false;
            }
            else if (realmName == "unknown")
            {
                component.m_subtext.text = string.Empty;
                flag = false;
            }
            else
            {
                if (online)
                {
                    component.m_subtext.text = realmName;
                }
                else
                {
                    component.m_subtext.text = realmName + " (" + StaticDB.GetString("OFFLINE", null) + ")";
                }
                component.m_subtext.color = Color.yellow;
            }
            component.m_subtext.gameObject.SetActive(true);
            if (!flag)
            {
                Button component2 = gameObject.GetComponent <Button>();
                component2.interactable          = false;
                component.m_characterName.color  = Color.grey;
                component.m_characterLevel.color = Color.grey;
            }
            int num = (int)charData.ExperienceLevel;

            if (num < 1)
            {
                num = 1;
            }
            component.m_characterLevel.text = GeneralHelpers.TextOrderString(CharacterListView.m_levelText, num.ToString());
        }
Beispiel #11
0
        private void UpdateRecruitButtonState()
        {
            bool flag = GarrisonStatus.WarResources() >= this.m_shipmentCost;

            this.m_itemResourceCostText.color = ((!flag) ? Color.red : Color.white);
            bool flag2 = true;

            if (this.m_charShipmentRec != null && !PersistentShipmentData.CanOrderShipmentType(this.m_charShipmentRec.ID))
            {
                flag2 = false;
            }
            TroopSlot[] componentsInChildren = this.m_troopSlotsRootObject.GetComponentsInChildren <TroopSlot>(true);
            if (componentsInChildren.Length < 6)
            {
                this.m_troopSlotsRootObject.GetComponent <GridLayoutGroup>().constraintCount = 2;
            }
            else
            {
                this.m_troopSlotsRootObject.GetComponent <GridLayoutGroup>().constraintCount = 3;
            }
            bool flag3 = false;

            foreach (TroopSlot troopSlot in componentsInChildren)
            {
                if (troopSlot.IsEmpty())
                {
                    flag3 = true;
                    break;
                }
            }
            this.m_recruitButtonText.color = new Color(1f, 0.82f, 0f, 1f);
            if (!flag3)
            {
                this.m_recruitButtonText.text  = StaticDB.GetString("SLOTS_FULL", null);
                this.m_recruitButtonText.color = new Color(0.5f, 0.5f, 0.5f, 1f);
            }
            else if (!flag)
            {
                this.m_recruitButtonText.text  = StaticDB.GetString("CANT_AFFORD", "Can't Afford");
                this.m_recruitButtonText.color = new Color(0.5f, 0.5f, 0.5f, 1f);
            }
            else if (this.m_isTroop)
            {
                this.m_recruitButtonText.text = StaticDB.GetString("RECRUIT", null);
            }
            else
            {
                this.m_recruitButtonText.text = StaticDB.GetString("PLACE_ORDER", null);
            }
            if (flag3 && flag && flag2)
            {
                this.m_recruitTroopsButton.interactable = true;
            }
            else
            {
                this.m_recruitTroopsButton.interactable = false;
                this.m_recruitButtonText.color          = new Color(0.5f, 0.5f, 0.5f, 1f);
            }
        }
        private bool UpdateTimeRemaining()
        {
            TimeSpan timeSpan = this.m_bounty.EndTime - GarrisonStatus.CurrentTime();

            timeSpan             = ((timeSpan.TotalSeconds <= 0.0) ? TimeSpan.Zero : timeSpan);
            this.m_timeLeft.text = StaticDB.GetString("TIME_LEFT", "Time Left: PH") + " " + timeSpan.GetDurationString(timeSpan.Days == 0, TimeUnit.Minute);
            return(timeSpan.TotalSeconds > 0.0);
        }
 private void Update()
 {
     if (this.shouldShowConnectingPanel && StaticDB.StringsAvailable())
     {
         this.ShowConnectingPanel();
     }
     this.SetConnectingPanelCancelButtonEnabled(Singleton <Login> .Instance.CanCancelNow());
 }
Beispiel #14
0
 private void LoadStringFromDB()
 {
     if (StaticDB.StringsAvailable() && !string.IsNullOrEmpty(this.baseTag))
     {
         this.text         = StaticDB.GetString(this.baseTag, this.fallbackString);
         this.waitingForDB = false;
     }
 }
Beispiel #15
0
 private void OnStreamUpdated(Club.ClubStreamUpdatedEvent streamUpdatedEvent)
 {
     if (this.m_focusedStream != null && this.m_community != null && streamUpdatedEvent.StreamID == this.m_focusedStream.StreamId && streamUpdatedEvent.ClubID == this.m_community.ClubId && base.gameObject.activeSelf && !this.m_community.CanAccessUpdatedChannel(streamUpdatedEvent))
     {
         this.ForceCloseChatPanel();
         AllPopups.instance.ShowGenericPopupFull(StaticDB.GetString("CHANNEL_NO_LONGER_VALID", "[PH] The channel is no longer valid."));
     }
 }
Beispiel #16
0
        public void Init(FollowerDetailView followerDetailView, int abilityToReplace)
        {
            this.m_followerDetailView = followerDetailView;
            this.m_abilityToReplace   = abilityToReplace;
            FollowerInventoryListItem[] componentsInChildren = this.m_equipmentInventoryContent.GetComponentsInChildren <FollowerInventoryListItem>(true);
            foreach (FollowerInventoryListItem followerInventoryListItem in componentsInChildren)
            {
                Object.Destroy(followerInventoryListItem.gameObject);
            }
            int num = 0;

            foreach (WrapperFollowerEquipment item in PersistentEquipmentData.equipmentDictionary.Values)
            {
                if (num == 0)
                {
                    GameObject gameObject = Object.Instantiate <GameObject>(this.m_headerPrefab);
                    gameObject.transform.SetParent(this.m_equipmentInventoryContent.transform, false);
                    FollowerInventoryListItem component = gameObject.GetComponent <FollowerInventoryListItem>();
                    component.SetHeaderText("Equipment");
                }
                GameObject gameObject2 = Object.Instantiate <GameObject>(this.m_followerInventoryListItemPrefab);
                gameObject2.transform.SetParent(this.m_equipmentInventoryContent.transform, false);
                FollowerInventoryListItem component2 = gameObject2.GetComponent <FollowerInventoryListItem>();
                component2.SetEquipment(item, followerDetailView, abilityToReplace);
                num++;
            }
            if (num == 0)
            {
                GameObject gameObject3 = Object.Instantiate <GameObject>(this.m_headerPrefab);
                gameObject3.transform.SetParent(this.m_equipmentInventoryContent.transform, false);
                FollowerInventoryListItem component3 = gameObject3.GetComponent <FollowerInventoryListItem>();
                component3.SetHeaderText(StaticDB.GetString("NO_EQUIPMENT", null));
            }
            int num2 = 0;

            foreach (WrapperFollowerArmamentExt item2 in PersistentArmamentData.armamentDictionary.Values)
            {
                if (num2 == 0)
                {
                    GameObject gameObject4 = Object.Instantiate <GameObject>(this.m_headerPrefab);
                    gameObject4.transform.SetParent(this.m_equipmentInventoryContent.transform, false);
                    FollowerInventoryListItem component4 = gameObject4.GetComponent <FollowerInventoryListItem>();
                    component4.SetHeaderText("Armaments");
                }
                GameObject gameObject5 = Object.Instantiate <GameObject>(this.m_followerInventoryListItemPrefab);
                gameObject5.transform.SetParent(this.m_equipmentInventoryContent.transform, false);
                FollowerInventoryListItem component5 = gameObject5.GetComponent <FollowerInventoryListItem>();
                component5.SetArmament(item2, followerDetailView);
                num2++;
            }
            if (num == 0)
            {
                GameObject gameObject6 = Object.Instantiate <GameObject>(this.m_headerPrefab);
                gameObject6.transform.SetParent(this.m_equipmentInventoryContent.transform, false);
                FollowerInventoryListItem component6 = gameObject6.GetComponent <FollowerInventoryListItem>();
                component6.SetHeaderText(StaticDB.GetString("NO_ARMAMENTS", null));
            }
        }
 private void Update()
 {
     if (this.m_lootDisplayPending && this.m_contributeButton.interactable)
     {
         this.m_delayBeforeShowingLoot -= Time.deltaTime;
         if (this.m_delayBeforeShowingLoot > 0f)
         {
             return;
         }
     }
     if (this.m_delayBeforeShowingLoot <= 0f && this.m_lootDisplayTimeRemaining > 0f && this.m_lootItemQuantity > 0)
     {
         if (!this.m_gotLootArea.activeSelf)
         {
             Main.instance.m_UISound.Play_GetItem();
             this.m_gotLootArea.SetActive(true);
             this.m_lootAreaCanvasGroup.alpha = 0f;
             iTween.ValueTo(base.gameObject, iTween.Hash(new object[] { "name", "Fade Loot In", "from", 0f, "to", 1f, "easeType", "easeOutCubic", "time", 0.5f, "onupdate", "FadeLootInCallback", "oncomplete", "FadeLootInCompleteCallback" }));
         }
         ItemRec record = StaticDB.itemDB.GetRecord(this.m_lootItemID);
         if (record == null)
         {
             this.m_gotLootItemName.text = string.Concat("???", (this.m_lootItemQuantity != 1 ? string.Concat(" (", this.m_lootItemQuantity, "x)") : string.Empty));
         }
         else
         {
             this.m_gotLootItemName.text = string.Concat(record.Display, (this.m_lootItemQuantity != 1 ? string.Concat(" (", this.m_lootItemQuantity, "x)") : string.Empty));
         }
         this.m_rewardDisplay.InitReward(MissionRewardDisplay.RewardType.item, this.m_lootItemID, 1, 0, 0);
         this.m_lootDisplayTimeRemaining -= Time.deltaTime;
     }
     else if (this.m_lootDisplayTimeRemaining <= 0f && this.m_lootDisplayPending)
     {
         if (this.m_gotLootArea.activeSelf)
         {
             iTween.ValueTo(base.gameObject, iTween.Hash(new object[] { "name", "Fade Loot Out", "from", 0f, "to", 1f, "easeType", "easeOutCubic", "time", 0.5f, "onupdate", "FadeLootOutCallback", "oncomplete", "FadeLootOutCompleteCallback" }));
         }
         this.m_lootDisplayPending = false;
     }
     if (LegionfallData.legionfallDictionary.ContainsKey(this.m_contributionID))
     {
         LegionfallData.ContributionData item = LegionfallData.legionfallDictionary[this.m_contributionID];
         WrapperContribution             wrapperContribution = item.contribution;
         if (wrapperContribution.State == 3)
         {
             if (item.underAttackExpireTime <= DateTime.UtcNow)
             {
                 DateTime dateTime = GarrisonStatus.CurrentTime();
                 item.underAttackExpireTime = dateTime.AddSeconds((double)item.contribution.CurrentValue);
             }
             TimeSpan timeSpan = item.underAttackExpireTime - GarrisonStatus.CurrentTime();
             timeSpan = (timeSpan.TotalSeconds <= 0 ? TimeSpan.Zero : timeSpan);
             this.m_healthText.text            = string.Concat(StaticDB.GetString("TIME_LEFT", null), " ", timeSpan.GetDurationString(false));
             this.m_progressFillBar.fillAmount = wrapperContribution.CurrentValue / wrapperContribution.UpperValue;
         }
     }
 }
Beispiel #18
0
 private void OnClubRemoved(Club.ClubRemovedEvent clubRemovedEvent)
 {
     if (this.m_community != null && clubRemovedEvent.ClubID == this.m_community.ClubId && base.gameObject.activeSelf)
     {
         string baseTag = (!this.m_community.IsGuild()) ? "COMMUNITY_NO_LONGER_VALID" : "GUILD_NO_LONGER_VALID";
         this.ForceCloseChatPanel();
         AllPopups.instance.ShowGenericPopupFull(StaticDB.GetString(baseTag, "[PH] You've been removed from this Community/Guild."));
     }
 }
 private void Awake()
 {
     this.m_availableMissionsTabLabel.font  = GeneralHelpers.LoadFancyFont();
     this.m_inProgressMissionsTabLabel.font = GeneralHelpers.LoadFancyFont();
     this.m_noMissionsAvailableLabel.font   = GeneralHelpers.LoadStandardFont();
     this.m_noMissionsAvailableLabel.text   = StaticDB.GetString("NO_MISSIONS_AVAILABLE", "No missions are currently available.");
     this.m_noMissionsInProgressLabel.font  = GeneralHelpers.LoadStandardFont();
     this.m_noMissionsInProgressLabel.text  = StaticDB.GetString("NO_MISSIONS_IN_PROGRESS", "No missions are currently in progress.");
 }
Beispiel #20
0
        public void OpenLeaveCommunityDialog()
        {
            string messageKey = MobileClient.FormatString(StaticDB.GetString("COMMUNITIES_CONFIRM_LEAVE_COMMUNITY_DESCRIPTION", "COMMUNITIES_CONFIRM_LEAVE_COMMUNITY_DESCRIPTION"), this.m_community.Name);

            Singleton <DialogFactory> .Instance.CreateOKCancelDialog("COMMUNITIES_CONFIRM_LEAVE_COMMUNITY", messageKey, delegate
            {
                this.m_community.LeaveOrDestroyClub();
            }, null);
        }
Beispiel #21
0
 protected override void Awake()
 {
     if (!this.overrideFont)
     {
         base.font = FontLoader.LoadFont(this.fontType);
     }
     this.waitingForDB = !StaticDB.StringsAvailable();
     this.LoadStringFromDB();
 }
 private void Start()
 {
     this.m_titleText.font = FontLoader.LoadFancyFont();
     this.m_titleText.text = StaticDB.GetString("CHARACTER_SELECTION", null);
     if (this.m_cancelText)
     {
         this.m_cancelText.font = FontLoader.LoadStandardFont();
         this.m_cancelText.text = StaticDB.GetString("LOG_OUT", null);
     }
 }
        public void SetEquipment(WrapperFollowerEquipment item, FollowerDetailView followerDetailView, int abilityToReplace)
        {
            this.m_abilityToReplace   = abilityToReplace;
            this.m_equipmentItem      = new WrapperFollowerEquipment?(item);
            this.m_followerDetailView = followerDetailView;
            ItemRec record = StaticDB.itemDB.GetRecord(item.ItemID);

            this.m_equipmentName.text = string.Concat(GeneralHelpers.GetItemQualityColorTag(record.OverallQualityID), record.Display, "</color>");
            GarrAbilityRec garrAbilityRec = StaticDB.garrAbilityDB.GetRecord(item.GarrAbilityID);

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

            if (sprite != null)
            {
                this.m_equipmentIcon.sprite = sprite;
            }
            else if (this.m_iconErrorText != null)
            {
                this.m_iconErrorText.gameObject.SetActive(true);
                this.m_iconErrorText.text = string.Concat(string.Empty, record.IconFileDataID);
            }
            this.m_equipmentQuantity.text = (item.Quantity <= 1 ? string.Empty : string.Concat(string.Empty, item.Quantity));
            if (PersistentFollowerData.followerDictionary[this.m_followerDetailView.GetCurrentFollower()].CurrentMissionID == 0)
            {
                this.m_useItemButtonLabel.text = StaticDB.GetString("USE_ITEM", null);
            }
            else
            {
                this.m_useItemButtonLabel.text    = StaticDB.GetString("ON_MISSION", null);
                this.m_useItemButtonLabel.color   = new Color(0.5f, 0.5f, 0.5f, 1f);
                this.m_useItemButton.interactable = false;
            }
        }
 private void Awake()
 {
     this.m_missionName.font        = GeneralHelpers.LoadFancyFont();
     this.m_missionLevel.font       = GeneralHelpers.LoadStandardFont();
     this.m_missionTime.font        = GeneralHelpers.LoadStandardFont();
     this.m_rareMissionLabel.font   = GeneralHelpers.LoadFancyFont();
     this.m_statusText.font         = GeneralHelpers.LoadStandardFont();
     this.m_rareMissionLabel.text   = StaticDB.GetString("RARE", "Rare!");
     this.m_previewAbilityID        = new int[3];
     this.m_previewCanCounterStatus = new FollowerCanCounterMechanic[3];
 }
 private void Awake()
 {
     this.m_toastCanvasGroup.alpha          = 0f;
     this.m_toastCanvasGroup.blocksRaycasts = false;
     this.m_toastCanvasGroup.interactable   = false;
     this.m_glowCanvasGroup.alpha           = 0f;
     this.m_glowCanvasGroup.blocksRaycasts  = false;
     this.m_glowCanvasGroup.interactable    = false;
     this.m_missionStartedLabel.font        = GeneralHelpers.LoadFancyFont();
     this.m_missionStartedLabel.text        = StaticDB.GetString("MISSION_STARTED", "Mission Started PH");
 }
        private void Start()
        {
            this.m_slidingPanel.m_closedAction += new Action(this.HidePanel);
            this.m_characterName.text           = Singleton <CharacterData> .instance.CharacterName.ToUpper();

            this.m_viewCharacterObj.SetActive(!Singleton <Login> .instance.GetBnPortal().Equals("cn", StringComparison.OrdinalIgnoreCase));
            if (this.m_viewCharacterText != null)
            {
                this.m_viewCharacterText.text = StaticDB.GetString("SETTINGS_VIEW_CHARACTER", "[PH]VIEW CHARACTER").Replace("&s", Singleton <CharacterData> .instance.CharacterName.ToUpper());
            }
        }
Beispiel #27
0
 public void SetMemberInfo(CommunityMember member)
 {
     this.m_characterNameText.text = member.Name.ToUpper();
     this.m_kickButtonText.text    = MobileClient.FormatString(StaticDB.GetString("COMMUNITIES_KICK_MEMBER", "[PH] Kick %s"), this.m_characterNameText.text);
     this.m_member = member;
     this.SetRoleToggleState();
     this.SetValidAssignableRoles();
     this.m_memberRole.onValueChanged.AddListener((bool argument0) => this.SetMemberRole());
     this.m_moderatorRole.onValueChanged.AddListener((bool argument1) => this.SetModeratorRole());
     this.m_leaderRole.onValueChanged.AddListener((bool argument2) => this.SetLeaderRole());
     this.m_ownerRole.onValueChanged.AddListener((bool argument3) => this.SetOwnerRole());
 }
Beispiel #28
0
 public void SetText(string titleKey, string messageKey = null)
 {
     this.m_titleText.text = StaticDB.GetString(titleKey, titleKey);
     if (messageKey != null)
     {
         this.m_messageText.text = StaticDB.GetString(messageKey, messageKey);
     }
     else
     {
         this.m_messageText.text = string.Empty;
     }
 }
 private string GetDateString(DateTime dateTime)
 {
     if (dateTime.DayOfYear == DateTime.Now.DayOfYear)
     {
         return(StaticDB.GetString("TODAY_CAPS", "Today [PH]"));
     }
     if (dateTime.DayOfYear == DateTime.Now.DayOfYear + 1 || dateTime.DayOfYear == 1)
     {
         return(StaticDB.GetString("TOMORROW_CAPS", "Tomorrow [PH]"));
     }
     return(dateTime.ToString(StaticDB.GetString("SHORT_MONTH_AND_DAY", "MMM d")));
 }
Beispiel #30
0
 private void OnRoleUpdatedEvent(Club.ClubMemberRoleUpdatedEvent roleUpdatedEvent)
 {
     if (this.m_focusedStream != null && this.m_community != null && roleUpdatedEvent.ClubID == this.m_community.ClubId && base.gameObject.activeSelf)
     {
         CommunityMember updatedMember = this.m_community.GetUpdatedMember(roleUpdatedEvent);
         if (updatedMember != null && updatedMember.IsSelf && !updatedMember.IsModerator && this.m_focusedStream.ForLeadersAndModerators)
         {
             this.ForceCloseChatPanel();
             AllPopups.instance.ShowGenericPopupFull(StaticDB.GetString("CHANNEL_NO_LONGER_VALID", "[PH] The channel is no longer valid."));
         }
     }
 }