hch
2025-11-28 be045e0feac023c82f6a6d22678a313e84157097
0312 去除登录过程不允许发包的逻辑,避免影响客户端发包
3个文件已修改
29 ■■■■ 已修改文件
Main/Core/NetworkPackage/GameNetSystem.cs 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Guild/GuildBaseWin.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Utility/TimeUtility.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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)
        {
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);
Main/Utility/TimeUtility.cs
@@ -496,13 +496,13 @@
    }
    // 到10点还要多少秒,如果已经过了10点,返回0
    public static int GetToTenClockSeconds()
    // 今日到x点还要多少秒,如果已经过了x点,返回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;
    }