From c6a7ac3739907e8bb7c751d408e227e19f246f49 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期五, 08 五月 2026 17:27:31 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master' into h5version
---
Main/System/Arena/ArenaChallengeCell.cs | 44 +++++++++++++++++++++++++++++++-------------
1 files changed, 31 insertions(+), 13 deletions(-)
diff --git a/Main/System/Arena/ArenaChallengeCell.cs b/Main/System/Arena/ArenaChallengeCell.cs
index 3a44e6c..e63148d 100644
--- a/Main/System/Arena/ArenaChallengeCell.cs
+++ b/Main/System/Arena/ArenaChallengeCell.cs
@@ -1,5 +1,4 @@
-锘縰sing System.Collections.Generic;
-using Cysharp.Threading.Tasks;
+using System.Collections.Generic;
using UnityEngine;
public class ArenaChallengeCell : MonoBehaviour
@@ -7,6 +6,8 @@
[SerializeField] AvatarCell avatarCell;
[SerializeField] TextEx txtName;
[SerializeField] TextEx txtAddScore;
+ [SerializeField] TextEx txtServerName;
+ [SerializeField] TextEx txtAddCrossScore;
[SerializeField] TextEx txtFightPoint;
[SerializeField] OfficialTitleCell officialTitleCell;
[SerializeField] List<ItemCell> itemCells;
@@ -33,20 +34,37 @@
return;
arenaMatchInfo = list[index];
- avatarCell.InitUI(AvatarHelper.GetAvatarModel((int)arenaMatchInfo.PlayerID, (int)arenaMatchInfo.Face, (int)arenaMatchInfo.FacePic)).Forget();
- avatarCell.SetOnLoaded(() =>
+ avatarCell.InitUI(AvatarHelper.GetAvatarModel((int)arenaMatchInfo.PlayerID, (int)arenaMatchInfo.Face, (int)arenaMatchInfo.FacePic));
+ avatarCell.SetListener(() =>
{
- avatarCell.SetListener(() =>
- {
- AvatarHelper.TryViewOtherPlayerInfo((int)arenaMatchInfo.PlayerID, viewPlayerLineupType: (int)BattlePreSetType.Arena);
- });
+ int serverID = (ArenaManager.Instance.IsOpenCrossServer() && arenaMatchInfo.PlayerID != PlayerDatas.Instance.baseData.PlayerID) ? (int)arenaMatchInfo.ServerID : 0;
+ AvatarHelper.TryViewOtherPlayerInfo((int)arenaMatchInfo.PlayerID, serverID, viewPlayerLineupType: (int)BattlePreSetType.Arena);
});
txtName.text = UIHelper.ServerStringTrim(arenaMatchInfo.PlayerName);
txtFightPoint.text = UIHelper.ReplaceLargeArtNum(arenaMatchInfo.FightPower);
- txtAddScore.text = Language.Get("Arena16", ArenaManager.Instance.GetChallengePoints(index));
-
- officialTitleCell.InitUI(arenaMatchInfo.RealmLV, (int)arenaMatchInfo.TitleID, 0.55f).Forget();
+
+ bool isCrossServer = ArenaManager.Instance.IsOpenCrossServer();
+ if (isCrossServer)
+ {
+ txtAddScore.SetActive(false);
+ txtServerName.SetActive(true);
+ if (ArenaManager.Instance.IsRobot((int)arenaMatchInfo.PlayerID))
+ txtServerName.text = ServerListCenter.Instance.GetServerName(UIHelper.GetServerIDByAccount(PlayerDatas.Instance.baseData.AccID));
+ else
+ txtServerName.text = ServerListCenter.Instance.GetServerName((int)arenaMatchInfo.ServerID);
+ txtAddCrossScore.SetActive(true);
+ txtAddCrossScore.text = Language.Get("Arena16", ArenaManager.Instance.GetChallengePoints(index));
+ }
+ else
+ {
+ txtAddScore.SetActive(true);
+ txtAddScore.text = Language.Get("Arena16", ArenaManager.Instance.GetChallengePoints(index));
+ txtServerName.SetActive(false);
+ txtAddCrossScore.SetActive(false);
+ }
+
+ officialTitleCell.InitUI(arenaMatchInfo.RealmLV, (int)arenaMatchInfo.TitleID, 0.55f);
int[][] rewards = ArenaManager.Instance.fixedChallengeRewards;
for (int i = 0; i < itemCells.Count; i++)
@@ -57,7 +75,7 @@
int itemCellIndex = i;
itemCell.SetActive(true);
itemCell.Init(new ItemCellModel(rewards[i][0], true, rewards[i][1]));
- itemCell.SetClickListener(() => ItemTipUtility.Show(rewards[itemCellIndex][0]));
+ itemCell.button.SetListener(() => ItemTipUtility.Show(rewards[itemCellIndex][0]));
}
else
{
@@ -65,4 +83,4 @@
}
}
}
-}
+}
\ No newline at end of file
--
Gitblit v1.8.0