From 89343a7a0909e5244a3b69c4db1294de4536243b Mon Sep 17 00:00:00 2001
From: lcy <1459594991@qq.com>
Date: 星期一, 15 十二月 2025 18:15:22 +0800
Subject: [PATCH] 262 幻境阁系统-客户端 新增仅适用武将解锁的头像和形象的红点移除规则

---
 Main/Core/NetworkPackage/GameNetSystem.cs |   58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 58 insertions(+), 0 deletions(-)

diff --git a/Main/Core/NetworkPackage/GameNetSystem.cs b/Main/Core/NetworkPackage/GameNetSystem.cs
index 3624dd9..a0661a3 100644
--- a/Main/Core/NetworkPackage/GameNetSystem.cs
+++ b/Main/Core/NetworkPackage/GameNetSystem.cs
@@ -6,6 +6,10 @@
 
 public class GameNetSystem : Singleton<GameNetSystem>
 {
+    //闄愬埗瀹㈡埛绔殑涓嬩竴涓寘鏄櫥褰曞寘C0101_tagCPlayerLogin锛屽鏋滀笉鏄櫥褰曞寘涓嶅厑璁稿彂閫�
+    bool waitLogin = false; //绛夊緟鍙戦�佺櫥褰曞寘锛屽鏋滄湁鍏朵粬鍖呯洿鎺ュ睆钄斤紝閬垮厤鏂嚎閲嶈繛鐨勬儏鍐靛彂浜嗘敾鍑诲寘涔嬬被鐨�
+    //绛夊緟鏈嶅姟绔�0403鐨勫寘鍚庢墠鑳藉彂鍏朵粬鐨勫姛鑳藉寘锛屽彧鏈塁0123_tagCClientPackVersion 鍜� C0101_tagCPlayerLogin 鍙互鍙戦��  
+    bool waitLoginMap = false; 
     NetUpdateBehaviour m_NetUpdateBehaviour;
     NeverConnectState neverConnectState;
     AccountLoginState accountLoginState;
@@ -125,8 +129,61 @@
         });
     }
 
+    //闄愬埗瀹㈡埛绔殑涓嬩竴涓寘鏄櫥褰曞寘C0101_tagCPlayerLogin锛屽鏋滀笉鏄櫥褰曞寘涓嶅厑璁稿彂閫�
+    public void SetIsWaitLogin(bool _wait)
+    {
+        waitLogin = _wait;
+    }
+
+    //绛夊緟鏈嶅姟绔�0403鐨勫寘鍚庢墠鑳藉彂鍏朵粬鐨勫姛鑳藉寘锛屽彧鏈塁0123_tagCClientPackVersion 鍜� C0101_tagCPlayerLogin 鍙互鍙戦��
+    public void SetIsWaitLoginMap(bool _wait)
+    {
+        waitLoginMap = _wait;
+    }
+
+    public bool GetIsWaitLoginMap()
+    {
+        return waitLoginMap;
+    }
+
+    //0403鐧诲綍涔嬪墠鐨勫寘缂撳瓨
+    Queue<GameNetPackBasic> sendQueue = new Queue<GameNetPackBasic>();
+
+    public void SendCachePackage()
+    {
+        int cnt = sendQueue.Count;
+        if (mainSocket != null)
+        {
+            while (sendQueue.Count > 0)
+            {
+                SendInfo(sendQueue.Dequeue());
+            }
+        }
+        Debug.LogError($"閲嶇偣鎻愰啋锛�0403鐧诲綍鍚� 鍙戦�佺紦瀛樺寘鏁伴噺 {cnt} 涓�");
+    }
+
     public void SendInfo(GameNetPackBasic protocol)
     {
+        if (waitLogin)
+        {
+            if (protocol is not C0101_tagCPlayerLogin)
+            {
+                Debug.LogWarning("绛夊緟鎵ц鐧诲綍锛屼笉鍏佽鍙戦�佸叾浠栧寘 " + protocol.ToString());
+                return;
+            }
+        }
+
+        // 0102鏄粠鍦板浘鍙戦�佺殑 璇存槑宸茬櫥褰曪紝浣嗗彲鑳藉崱椤垮鑷撮�氱煡route鐘舵�佹參浜庡鎴风锛屼緷鐒堕渶瑕侀槻鑼�
+        if (waitLoginMap)
+        {
+            if (protocol is not C0123_tagCClientPackVersion && protocol is not C0101_tagCPlayerLogin)
+            {
+                Debug.LogError("閲嶇偣鎻愰啋锛氱櫥褰曞畬鎴愬墠鐨勫皝鍖呭厛鍔犲叆闃熷垪 绛�0403鍥炲寘鍚庡啀涓�璧峰彂閫佹湇鍔$ " + protocol.ToString());
+                sendQueue.Enqueue(protocol);
+                return;
+            }
+        }
+
         if (mainSocket != null)
         {
             mainSocket.SendInfo(protocol);
@@ -283,4 +340,5 @@
 {
     Main = 1,
     B430 = 2,
+    MainFight = 3,
 }

--
Gitblit v1.8.0