From aaf470d0edc5adaf3aaa0315672c6db0e2a900d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A3=AE2003?= <2384017988@qq.com> Date: Tue, 6 Oct 2026 16:35:09 +0800 Subject: [PATCH] 1 --- .../Windows/addressables_content_state.bin | Bin 4130 -> 4130 bytes .../Scripts/Net/WebSocketManager_Message.cs | 7 +++---- .../ChineseChess/ChineseChessMainPanel.cs | 5 +++-- .../ChineseChess/UIChineseChessDistrict.cs | 3 +++ 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Assets/AddressableAssetsData/Windows/addressables_content_state.bin b/Assets/AddressableAssetsData/Windows/addressables_content_state.bin index 18920a8e1389fc10b500f3fe57159ecffcf473fc..6fbafd645c547a8d2610dee14c6c7c5a4ec34fd4 100644 GIT binary patch delta 185 zcmZ3aut;HpCY!vmiCJ=5s!_5eXMX`;D_VX~!hn!#odw$Dro76wU{ z=4lqjCaK2B$w`T+1}3Sdrb(trCWaO%DJiK2o1-}&GOG|U%81?VOzY$XUI(USo|_l( d3NWb>(msg).arguments[0]; if (GameManager.Instance.user.id == va) { if (roomMainPanel != null) roomMainPanel.ClearRoomLocalState(); - // 面板已关闭(返回大厅退出)时不刷列表,否则 GetRoomList 响应会把已关的面板重新拉起 - if (roomMainPanel != null && roomMainPanel.gameObject.activeInHierarchy) - WebSocketSendList.GetRoomListChineseChess(0); } else { diff --git a/Assets/MyGame/aa/UI/Game/ChineseChess/ChineseChessMainPanel.cs b/Assets/MyGame/aa/UI/Game/ChineseChess/ChineseChessMainPanel.cs index 339d496a5..ec3dccbb2 100644 --- a/Assets/MyGame/aa/UI/Game/ChineseChess/ChineseChessMainPanel.cs +++ b/Assets/MyGame/aa/UI/Game/ChineseChess/ChineseChessMainPanel.cs @@ -912,10 +912,11 @@ public class ChineseChessMainPanel : GameMainPanel_Base { if (userId != MyChessUserId) return; - // 停止计时/棋盘/输入 → 清空房间本地状态 → 回大厅重拉列表 + // 停止计时/棋盘/输入 → 清空房间本地状态 → 回大厅按当前选中分区重拉列表(不能用 0,会返回全部分区导致列表与 tab 不符) ClearRoomLocalState(); subUIManager.CloseAll(); - WebSocketSendList.GetRoomListChineseChess(0); + var districtPanel = subUIManager.Get(UIPanel.ZGXQDistrict); + WebSocketSendList.GetRoomListChineseChess(districtPanel != null ? districtPanel.currDistrict : 1); // 优先显示服务端 reason,为空显示默认文案 UIManager.Instance.ShowBoardError(string.IsNullOrEmpty(reason) ? "已被移出房间" : reason); diff --git a/Assets/MyGame/aa/UI/Game/ChineseChess/UIChineseChessDistrict.cs b/Assets/MyGame/aa/UI/Game/ChineseChess/UIChineseChessDistrict.cs index 4e5c1f498..d3749ff76 100644 --- a/Assets/MyGame/aa/UI/Game/ChineseChess/UIChineseChessDistrict.cs +++ b/Assets/MyGame/aa/UI/Game/ChineseChess/UIChineseChessDistrict.cs @@ -20,6 +20,8 @@ public class UIChineseChessDistrict : SubUIBase public Transform tra_DaQuParent; public Transform tra_FenQuItem; // child0=Toggle, child0.child0=TextMeshProUGUI(象棋n区) public int maxDistrict = 10; // 最大分区数 + /// 当前选中的分区号(1 开始):退房/被踢回大厅时用它刷新,保证列表与 tab 一致 + public int currDistrict = 1; private bool _tabsBuilt = false; @@ -164,6 +166,7 @@ public class UIChineseChessDistrict : SubUIBase Destroy(panel_RoomItemParent.GetChild(i).gameObject); itemListDic.Clear(); + currDistrict = district; // 记录当前选中分区(退房/被踢回大厅时按它刷新) WebSocketSendList.GetRoomListChineseChess(district); }); }