From be045e0feac023c82f6a6d22678a313e84157097 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期五, 28 十一月 2025 15:08:02 +0800
Subject: [PATCH] 0312 去除登录过程不允许发包的逻辑,避免影响客户端发包

---
 Main/Utility/TimeUtility.cs               |    8 ++++----
 Main/Core/NetworkPackage/GameNetSystem.cs |   17 +++++++++--------
 Main/System/Guild/GuildBaseWin.cs         |    4 ++--
 3 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/Main/Core/NetworkPackage/GameNetSystem.cs b/Main/Core/NetworkPackage/GameNetSystem.cs
index 56744e6..059ca0b 100644
--- a/Main/Core/NetworkPackage/GameNetSystem.cs
+++ b/Main/Core/NetworkPackage/GameNetSystem.cs
@@ -152,14 +152,15 @@
             }
         }
 
-        if (waitLoginMap)
-        {
-            if (protocol is not C0123_tagCClientPackVersion && protocol is not C0101_tagCPlayerLogin)
-            {
-                Debug.LogWarning("绛夊緟0403鍖咃紝涓嶅厑璁稿彂閫佸叾浠栧寘 " + protocol.ToString());
-                return;
-            }
-        }
+        // 0102鏄粠鍦板浘鍙戦�佺殑 璇存槑宸茬櫥褰曪紝闄ら潪鏈嶅姟绔姤閿欏紓甯革紝杩欓噷鍙互涓嶅睆钄�
+        // if (waitLoginMap)
+        // {
+        //     if (protocol is not C0123_tagCClientPackVersion && protocol is not C0101_tagCPlayerLogin)
+        //     {
+        //         Debug.LogError("绛夊緟0403鍖咃紝涓嶅厑璁稿彂閫佸叾浠栧寘 " + protocol.ToString());
+        //         return;
+        //     }
+        // }
 
         if (mainSocket != null)
         {
diff --git a/Main/System/Guild/GuildBaseWin.cs b/Main/System/Guild/GuildBaseWin.cs
index ef5e6c9..f75ce64 100644
--- a/Main/System/Guild/GuildBaseWin.cs
+++ b/Main/System/Guild/GuildBaseWin.cs
@@ -78,7 +78,7 @@
 
     void OpenHawker()
     {
-        if (TimeUtility.GetToTenClockSeconds() > 0)
+        if (TimeUtility.GetToTheHourSeconds() > 0)
         {
             SysNotifyMgr.Instance.ShowTip("GuildSys17");
             return;
@@ -88,7 +88,7 @@
 
     void ShowHawkerTime()
     {
-        var toTenSeconds = TimeUtility.GetToTenClockSeconds();
+        var toTenSeconds = TimeUtility.GetToTheHourSeconds();
         if (toTenSeconds > 0)
         {
             guildHawkerTimeText.text = TimeUtility.SecondsToHMS(toTenSeconds);
diff --git a/Main/Utility/TimeUtility.cs b/Main/Utility/TimeUtility.cs
index 6aad2aa..f30b538 100644
--- a/Main/Utility/TimeUtility.cs
+++ b/Main/Utility/TimeUtility.cs
@@ -496,13 +496,13 @@
 
     }
 
-    // 鍒�10鐐硅繕瑕佸灏戠锛屽鏋滃凡缁忚繃浜�10鐐癸紝杩斿洖0
-    public static int GetToTenClockSeconds()
+    // 浠婃棩鍒皒鐐硅繕瑕佸灏戠锛屽鏋滃凡缁忚繃浜唜鐐癸紝杩斿洖0
+    public static int GetToTheHourSeconds(int hour=10)
     {
         var now = ServerNow;
-        if (now.Hour < 10)
+        if (now.Hour < hour)
         {
-            return (int)(ServerNow - new DateTime(now.Year, now.Month, now.Day, 10, 0, 0)).TotalSeconds;
+            return (int)(new DateTime(now.Year, now.Month, now.Day, hour, 0, 0) - ServerNow).TotalSeconds;
         }
         return 0;
     }

--
Gitblit v1.8.0