| | |
| | | [SerializeField] AvatarCell avatarCell; |
| | | [SerializeField] TextEx txtName; |
| | | [SerializeField] TextEx txtDate; |
| | | [SerializeField] TextEx txtCrossDate; |
| | | [SerializeField] TextEx txtServerName; |
| | | [SerializeField] TextEx txtFightPoint; |
| | | [SerializeField] TextEx txtState; |
| | | [SerializeField] TextEx txtAdd; |
| | |
| | | return; |
| | | arenaGameRec = sortedList[index]; |
| | | imgType.SetSprite(arenaGameRec.Value2 == 1 ? "ArenaRecordTypeAtk" : "ArenaRecordTypeDef"); |
| | | txtDate.text = FormatTime(arenaGameRec.Time); |
| | | |
| | | // 跨服记录样式显示逻辑 |
| | | if (ArenaManager.Instance.IsOpenCrossServer()) |
| | | { |
| | | // 跨服样式:txtDate隐藏,txtCrossDate和txtServerName显示 |
| | | txtDate.SetActive(false); |
| | | txtCrossDate.SetActive(true); |
| | | txtServerName.SetActive(true); |
| | | |
| | | if (arenaGameRec.Cross == 1) |
| | | { |
| | | // 跨服记录:显示跨服时间和跨服服务器 |
| | | txtCrossDate.text = FormatTime(arenaGameRec.Time); |
| | | txtServerName.text = ServerListCenter.Instance.GetServerName((int)arenaGameRec.ServerID); |
| | | } |
| | | else |
| | | { |
| | | // 本服记录:显示本服时间和本服服务器 |
| | | txtCrossDate.text = FormatTime(arenaGameRec.Time); |
| | | txtServerName.text = ServerListCenter.Instance.GetServerName(UIHelper.GetServerIDByAccount(PlayerDatas.Instance.baseData.AccID)); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | // 正常样式:txtDate显示,txtCrossDate和txtServerName隐藏 |
| | | txtDate.SetActive(true); |
| | | txtDate.text = FormatTime(arenaGameRec.Time); |
| | | txtCrossDate.SetActive(false); |
| | | txtServerName.SetActive(false); |
| | | } |
| | | |
| | | // true 已失效 false 未失效 |
| | | bool isTimeInvalid = ArenaManager.Instance.IsTimeInvalid(arenaGameRec.Time); |
| | | // 发起攻击,打赢有积分,打输没有 |
| | |
| | | avatarCell.InitUI(AvatarHelper.GetAvatarModel((int)arenaGameRec.Value3, (int)arenaGameRec.Value5, (int)arenaGameRec.Value6)); |
| | | avatarCell.SetListener(() => |
| | | { |
| | | AvatarHelper.TryViewOtherPlayerInfo((int)arenaGameRec.Value3, viewPlayerLineupType: (int)BattlePreSetType.Arena); |
| | | int serverID = (ArenaManager.Instance.IsOpenCrossServer() && arenaGameRec.Value3 != PlayerDatas.Instance.baseData.PlayerID) ? (int)arenaGameRec.ServerID : 0; |
| | | AvatarHelper.TryViewOtherPlayerInfo((int)arenaGameRec.Value3, serverID, viewPlayerLineupType: (int)BattlePreSetType.Arena); |
| | | }); |
| | | txtName.text = arenaGameRec.Name; |
| | | txtFightPoint.text = UIHelper.ReplaceLargeArtNum(arenaGameRec.FightPower); |