private void UpdateRewards() { base.GetElement <UXLabel>("LabelRewardTitle").Text = this.lang.Get("CONFLICT_END_PRIZE", new object[0]); TimedEventPrizeUtils.TrySetupConflictEndedRewardView(this.tournament.RedeemedRewards, base.GetElement <UXLabel>("LabelReward"), base.GetElement <UXSprite>("SpriteReward")); }
private void SetupConflictTransmission(TransmissionVO transmission) { this.battleLogTransmission.Visible = false; this.ShowGenericTransmissionGroup(false); this.conflictContainer.Visible = true; this.squadWarEndedContainer.Visible = false; this.genericTransmissionTextGroup.Visible = false; this.SetupTransmissionButtons(transmission); IDataController dataController = Service.Get <IDataController>(); CurrentPlayer currentPlayer = Service.Get <CurrentPlayer>(); this.conflictEndVO = dataController.GetOptional <TournamentVO>(transmission.TransData); TournamentTierVO optional = dataController.GetOptional <TournamentTierVO>(transmission.Btn1Data); if (this.conflictEndVO == null || optional == null) { return; } Tournament tournament = currentPlayer.TournamentProgress.GetTournament(this.conflictEndVO.Uid); if (tournament == null) { Service.Get <StaRTSLogger>().ErrorFormat("Tournament doesn't exist for player. tournament {0}", new object[] { this.conflictEndVO.Uid }); this.conflictMessage.Visible = false; this.conflictTierIcon.Visible = false; return; } TournamentRank finalRank = tournament.FinalRank; string text = LangUtils.AppendPlayerFactionToKey("hn_conflict_end_message"); this.conflictMessage.Visible = true; this.conflictTierIcon.Visible = true; this.conflictMessage.Text = this.lang.Get(text.ToString(), new object[] { LangUtils.GetPlanetDisplayName(this.conflictEndVO.PlanetId) }); this.conflictTierIcon.SpriteName = Service.Get <TournamentController>().GetTierIconName(optional); this.conflictTierTitle.Text = this.lang.Get("s_YourTier", new object[0]); this.conflictTierLevel.Text = this.lang.Get("CONFLICT_LEAGUE_AND_DIVISION", new object[] { this.lang.Get(optional.RankName, new object[0]), this.lang.Get(optional.DivisionSmall, new object[0]) }); this.conflictTierPercent.Text = this.lang.Get("CONFLICT_TIER_PERCENTILE", new object[] { Math.Round(finalRank.Percentile, 2) }); bool flag = TimedEventPrizeUtils.TrySetupConflictEndedRewardView(tournament.RedeemedRewards, this.holonetScreen.GetElement <UXLabel>("LabelReward"), this.holonetScreen.GetElement <UXSprite>("SpriteReward")); if (flag) { this.holonetScreen.GetElement <UXLabel>("LabelRewardTitle").Text = this.lang.Get("CONFLICT_END_PRIZE", new object[0]); } else { Service.Get <StaRTSLogger>().ErrorFormat("There is no reward given to player for tournament {0}", new object[] { this.conflictEndVO.Uid }); } Service.Get <ViewTimerManager>().CreateViewTimer(0.5f, false, new TimerDelegate(this.ShowReward), null); }