// Token: 0x06009F28 RID: 40744 RVA: 0x002D03F8 File Offset: 0x002CE5F8 public void SetRealTimePVPBattleReport(RealTimePVPBattleReport battleReport) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetRealTimePVPBattleReportRealTimePVPBattleReport_hotfix != null) { this.m_SetRealTimePVPBattleReportRealTimePVPBattleReport_hotfix.call(new object[] { this, battleReport }); return; } BJLuaObjHelper.IsSkipLuaHotfix = false; IConfigDataLoader configDataLoader = GameManager.Instance.ConfigDataLoader as IConfigDataLoader; ProjectLPlayerContext projectLPlayerContext = GameManager.Instance.PlayerContext as ProjectLPlayerContext; int num = configDataLoader.UtilityGetVersion(VersionInfoId.VersionInfoId_BattleReport); this.m_replayButton.gameObject.SetActive(battleReport.ReportType != RealTimePVPBattleReportType.Invaild && battleReport.Version == num); RealTimePVPBattleReportPlayerData realTimePVPBattleReportPlayerData; RealTimePVPBattleReportPlayerData realTimePVPBattleReportPlayerData2; if (projectLPlayerContext.IsMe(battleReport.PlayerDatas[0].UserId)) { realTimePVPBattleReportPlayerData = battleReport.PlayerDatas[0]; realTimePVPBattleReportPlayerData2 = battleReport.PlayerDatas[1]; } else { realTimePVPBattleReportPlayerData = battleReport.PlayerDatas[1]; realTimePVPBattleReportPlayerData2 = battleReport.PlayerDatas[0]; } this.m_playerNameText.text = realTimePVPBattleReportPlayerData2.Name; this.m_playerLevelText.text = realTimePVPBattleReportPlayerData2.Level.ToString(); if (battleReport.Win) { this.m_scoreText.text = UIUtility.AddColorTag(realTimePVPBattleReportPlayerData.ScoreDiff.ToString(), new Color(0.13333334f, 0.6745098f, 0.219607845f)); this.m_modeUIStateCtrl.SetToUIState("Succeed", false, true); } else { this.m_scoreText.text = UIUtility.AddColorTag(realTimePVPBattleReportPlayerData.ScoreDiff.ToString(), Color.red); this.m_modeUIStateCtrl.SetToUIState("Failed", false, true); } this.m_typeUIStateCtrl.SetToUIState((battleReport.ReportType != RealTimePVPBattleReportType.Friendly) ? "Ladder" : "Casual", false, true); TimeSpan timeSpan = projectLPlayerContext.GetServerTime() - battleReport.CreateTime; if (timeSpan.TotalHours < 1.0) { this.m_timeText.text = configDataLoader.UtilityGetStringByStringTable(StringTableId.StringTableId_Time_InOneHour); } else if (timeSpan.TotalDays < 1.0 && timeSpan.TotalHours >= 1.0) { this.m_timeText.text = string.Format(configDataLoader.UtilityGetStringByStringTable(StringTableId.StringTableId_Time_HoursAgo), Math.Floor(timeSpan.TotalHours).ToString()); } else if (timeSpan.TotalDays >= 1.0) { this.m_timeText.text = string.Format(configDataLoader.UtilityGetStringByStringTable(StringTableId.StringTableId_Time_DaysAgo), Math.Floor(timeSpan.TotalDays).ToString()); } this.m_playerIconImage.sprite = AssetUtility.Instance.GetSprite(UIUtility.GetPlayerHeadIconImageName(HeadIconTools.GetHeadPortrait(realTimePVPBattleReportPlayerData2.HeadIcon))); this.m_battleReport = battleReport; }
// Token: 0x06014177 RID: 82295 RVA: 0x0051E40C File Offset: 0x0051C60C public void SetName(string name) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetNameString_hotfix != null) { this.m_SetNameString_hotfix.call(new object[] { this, name }); return; } BJLuaObjHelper.IsSkipLuaHotfix = false; this.m_nameText.text = UIUtility.AddColorTag(this.m_id.ToString(), new Color(1f, 0.5f, 0f)) + " " + name; }
// Token: 0x0601207C RID: 73852 RVA: 0x004A6A9C File Offset: 0x004A4C9C private void SetMissionInfo() { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetMissionInfo_hotfix != null) { this.m_SetMissionInfo_hotfix.call(new object[] { this }); return; } BJLuaObjHelper.IsSkipLuaHotfix = false; this.m_titleText.text = this.m_mission.Config.Title; this.m_descText.text = this.m_mission.Config.Desc; GameObjectUtility.DestroyChildren(this.m_rewardListGo); GameObject assetInContainer = base.GetAssetInContainer <GameObject>("RewardItem"); RewardGoodsUIController.CreateRewardGoodsList(this.m_mission.Config.Reward, this.m_rewardListGo.transform, assetInContainer, null, true, 0, false); int missionMaxProcess = this.playerCtx.GetMissionMaxProcess(this.m_mission); if (this.m_isMissionCompleted) { this.m_countText.text = UIUtility.AddColorTag(this.playerCtx.GetMissionCompleteProcess(this.m_mission) + "/" + missionMaxProcess, UIUtility.MyGreenColor); } else { this.m_countText.text = UIUtility.AddColorTag(this.playerCtx.GetMissionCompleteProcess(this.m_mission) + string.Empty, Color.red) + "/" + missionMaxProcess; } CommonUIStateController component = base.gameObject.GetComponent <CommonUIStateController>(); if (this.m_isMissionFinished) { component.SetToUIState("Finished", false, true); } else if (this.m_isMissionCompleted) { component.SetToUIState("Get", false, true); } else { component.SetToUIState("PorgressBar", false, true); this.m_progressImg.fillAmount = (float)this.playerCtx.GetMissionCompleteProcess(this.m_mission) / (float)missionMaxProcess; } this.m_achievementIconGo.SetActive(this.m_mission.Config.MissionColumn == MissionColumnType.MissionColumnType_Achievements); }
// Token: 0x06012575 RID: 75125 RVA: 0x004B5F90 File Offset: 0x004B4190 protected void UpdateCostPanelState(RafflePool rafflePool) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_UpdateCostPanelStateRafflePool_hotfix != null) { this.m_UpdateCostPanelStateRafflePool_hotfix.call(new object[] { this, rafflePool }); return; } BJLuaObjHelper.IsSkipLuaHotfix = false; int num = rafflePool.Config.FreeDrawCount - rafflePool.FreeDrawedCount; if (num > 0) { this.CostPanelStateCtrl.SetToUIState("Free", false, true); string format = this.ConfigDataLoader.UtilityGetStringByStringTable(StringTableId.StringTableId_Raffle_FreeCountTitle); this.FreeCountValueText.text = string.Format(format, num); } else { this.CostPanelStateCtrl.SetToUIState("Crystal", false, true); this.CostImage.sprite = AssetUtility.Instance.GetSprite(UIUtility.GetGoodsIconName(rafflePool.Config.GoodsType, rafflePool.Config.DrawItemID)); this.CostImage.material = AssetUtility.Instance.GetAsset <Material>(UIUtility.GetGoodsIconMaterialName(rafflePool.Config.GoodsType, rafflePool.Config.DrawItemID)); string format2 = this.ConfigDataLoader.UtilityGetStringByStringTable(StringTableId.StringTableId_Raffle_CostTitle); this.CostTileText.text = string.Format(format2, UIUtility.GetGoodsName(rafflePool.Config.GoodsType, rafflePool.Config.DrawItemID)); int drawItemCost = (GameManager.Instance.PlayerContext as ProjectLPlayerContext).GetDrawItemCost(rafflePool); int goodsCount = UIUtility.GetGoodsCount(rafflePool.Config.GoodsType, rafflePool.Config.DrawItemID); this.CostValueText.text = drawItemCost.ToString(); if (drawItemCost > goodsCount) { this.HaveMoneyValueText.text = UIUtility.AddColorTag(goodsCount.ToString(), Color.red); } else { this.HaveMoneyValueText.text = goodsCount.ToString(); } } }
// Token: 0x06009EDA RID: 40666 RVA: 0x002CF528 File Offset: 0x002CD728 public void SetArenaBattleReport(ArenaBattleReport battleReport) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetArenaBattleReportArenaBattleReport_hotfix != null) { this.m_SetArenaBattleReportArenaBattleReport_hotfix.call(new object[] { this, battleReport }); return; } BJLuaObjHelper.IsSkipLuaHotfix = false; IConfigDataLoader configDataLoader = GameManager.Instance.ConfigDataLoader as IConfigDataLoader; ProjectLPlayerContext projectLPlayerContext = GameManager.Instance.PlayerContext as ProjectLPlayerContext; bool flag = projectLPlayerContext.IsMe(battleReport.AttackerUserId); int num = configDataLoader.UtilityGetVersion(VersionInfoId.VersionInfoId_BattleReport); this.m_replayButton.gameObject.SetActive(battleReport.Status != ArenaBattleReportStatus.Invaild && battleReport.Version == num); int num2; if (flag) { this.m_playerNameText.text = battleReport.DefenderName; this.m_playerLevelText.text = battleReport.DefenderLevel.ToString(); this.m_revengeButton.gameObject.SetActive(false); this.m_haveRevengeButton.gameObject.SetActive(false); num2 = battleReport.AttackerGotArenaPoints; } else { this.m_playerNameText.text = battleReport.AttackerName; this.m_playerLevelText.text = battleReport.AttackerLevel.ToString(); if (battleReport.Status == ArenaBattleReportStatus.Defend) { this.m_haveRevengeButton.gameObject.SetActive(false); this.m_revengeButton.gameObject.SetActive(true); } else if (battleReport.Status == ArenaBattleReportStatus.Revenged) { this.m_haveRevengeButton.gameObject.SetActive(true); this.m_revengeButton.gameObject.SetActive(false); } else if (battleReport.Status == ArenaBattleReportStatus.RevengeDefend) { this.m_haveRevengeButton.gameObject.SetActive(false); this.m_revengeButton.gameObject.SetActive(false); } num2 = battleReport.DefenderGotArenaPoints; } if (num2 >= 0) { this.m_arenaPointsText.text = UIUtility.AddColorTag(num2.ToString(), new Color(0.13333334f, 0.6745098f, 0.219607845f)); if (flag) { this.m_modeUIStateCtrl.SetToUIState("Attack", false, true); } else { this.m_modeUIStateCtrl.SetToUIState("Defense", false, true); } } else { this.m_arenaPointsText.text = UIUtility.AddColorTag(num2.ToString(), Color.red); if (flag) { this.m_modeUIStateCtrl.SetToUIState("AttackFailed", false, true); } else { this.m_modeUIStateCtrl.SetToUIState("DefenseFailed", false, true); } } TimeSpan timeSpan = projectLPlayerContext.GetServerTime() - new DateTime(battleReport.CreateTime); if (timeSpan.TotalHours < 1.0) { this.m_timeText.text = configDataLoader.UtilityGetStringByStringTable(StringTableId.StringTableId_Time_InOneHour); } else if (timeSpan.TotalDays < 1.0 && timeSpan.TotalHours >= 1.0) { this.m_timeText.text = string.Format(configDataLoader.UtilityGetStringByStringTable(StringTableId.StringTableId_Time_HoursAgo), Math.Floor(timeSpan.TotalHours).ToString()); } else if (timeSpan.TotalDays >= 1.0) { this.m_timeText.text = string.Format(configDataLoader.UtilityGetStringByStringTable(StringTableId.StringTableId_Time_DaysAgo), Math.Floor(timeSpan.TotalDays).ToString()); } this.m_playerIconImage.sprite = AssetUtility.Instance.GetSprite(UIUtility.GetPlayerHeadIconImageName(HeadIconTools.GetHeadPortrait(battleReport.OpponentHeadIcon))); this.m_battleReport = battleReport; }