0312 去除登录过程不允许发包的逻辑,避免影响客户端发包
| | |
| | | } |
| | | } |
| | | |
| | | 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) |
| | | { |
| | |
| | | |
| | | void OpenHawker() |
| | | { |
| | | if (TimeUtility.GetToTenClockSeconds() > 0) |
| | | if (TimeUtility.GetToTheHourSeconds() > 0) |
| | | { |
| | | SysNotifyMgr.Instance.ShowTip("GuildSys17"); |
| | | return; |
| | |
| | | |
| | | void ShowHawkerTime() |
| | | { |
| | | var toTenSeconds = TimeUtility.GetToTenClockSeconds(); |
| | | var toTenSeconds = TimeUtility.GetToTheHourSeconds(); |
| | | if (toTenSeconds > 0) |
| | | { |
| | | guildHawkerTimeText.text = TimeUtility.SecondsToHMS(toTenSeconds); |
| | |
| | | |
| | | } |
| | | |
| | | // 到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; |
| | | } |