少年修仙传客户端代码仓库
client_Wu Xijin
2019-01-07 649d8c2cd91594020734725e04ec6c18caab148c
3335 更新切图相关封包发送到后台的记录
7个文件已修改
109 ■■■■■ 已修改文件
Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0102_tagCDBPlayer.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0109_tagServerPrepareOK.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/HA1_Sys/DTCA126_tagMCPrepareChangeMap.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/HA1_Sys/DTCA127_tagMCStartChangeMap.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Stage/StageManager.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Login/CrossServerLogin.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Utility/StageLoadTimeOutCatcher.cs 67 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0102_tagCDBPlayer.cs
@@ -20,8 +20,7 @@
        base.Done(vNetPack);
        H0102_tagCDBPlayer vNetData = vNetPack as H0102_tagCDBPlayer;
        StageLoadTimeOutCatcher.got0102Time = DateTime.Now;
        StageLoadTimeOutCatcher.ReportChangeMapRecord(vNetPack.socketType, "0102", DateTime.Now);
        DEBUG_0102 = true;
        DTC0403_tagPlayerLoginLoadOK.finishedLogin = false;
@@ -242,6 +241,8 @@
        StatusMgr.Instance.ReleaseActor(PlayerDatas.Instance.PlayerId);
        GAMgr.Instance.UnInit();
        DEBUG_STEP = 9;
        StageLoadTimeOutCatcher.RecordProtocol(vNetPack.socketType, "0102", DateTime.Now);
    }
}
Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0109_tagServerPrepareOK.cs
@@ -24,8 +24,7 @@
            return;
        }
        StageLoadTimeOutCatcher.got0109Time = DateTime.Now;
        StageLoadTimeOutCatcher.ReportChangeMapRecord(vNetData.socketType, "0109", DateTime.Now);
        StageLoadTimeOutCatcher.RecordProtocol(vNetData.socketType, "0109", DateTime.Now);
        //修改技能快捷设置发包顺序
        PlayerDatas.Instance.skill.CheckQuickSet();
@@ -43,8 +42,7 @@
                    GameNetSystem.Instance.SendInfo(mapOk);
                    DTCA127_tagMCStartChangeMap.isChangeLine = false;
                    StageLoadTimeOutCatcher.send0107Time = DateTime.Now;
                    StageLoadTimeOutCatcher.ReportChangeMapRecord(GameNetSystem.SocketType.Main, "0107", DateTime.Now);
                    StageLoadTimeOutCatcher.RecordProtocol(GameNetSystem.SocketType.Main, "0107", DateTime.Now);
                }
                break;
            case GameNetSystem.SocketType.CrossSever:
@@ -55,8 +53,7 @@
                    mapOk.Type = 0;
                    GameNetSystem.Instance.SendToCrossServer(mapOk);
                    StageLoadTimeOutCatcher.send0107Time = DateTime.Now;
                    StageLoadTimeOutCatcher.ReportChangeMapRecord(GameNetSystem.SocketType.CrossSever, "0107", DateTime.Now);
                    StageLoadTimeOutCatcher.RecordProtocol(GameNetSystem.SocketType.CrossSever, "0107", DateTime.Now);
                }
                break;
            default:
Core/NetworkPackage/DTCFile/ServerPack/HA1_Sys/DTCA126_tagMCPrepareChangeMap.cs
@@ -21,8 +21,7 @@
            return;
        }
        StageLoadTimeOutCatcher.gotA126Time = DateTime.Now;
        StageLoadTimeOutCatcher.ReportChangeMapRecord(package.socketType, "A126", DateTime.Now);
        StageLoadTimeOutCatcher.RecordProtocol(package.socketType, "A126", DateTime.Now);
#if UNITY_EDITOR
        string _content = string.Format("DTCA126_tagMCPrepareChangeMap => 准备切换地图");
Core/NetworkPackage/DTCFile/ServerPack/HA1_Sys/DTCA127_tagMCStartChangeMap.cs
@@ -49,8 +49,7 @@
        DEBUG_A127 = true;
        var package = vNetPack as HA127_tagMCStartChangeMap;
        StageLoadTimeOutCatcher.gotA127Time = DateTime.Now;
        StageLoadTimeOutCatcher.ReportChangeMapRecord(package.socketType, "A127", DateTime.Now);
        StageLoadTimeOutCatcher.RecordProtocol(package.socketType, "A127", DateTime.Now);
        DEBUG_STEP = 0;
Fight/Stage/StageManager.cs
@@ -348,8 +348,7 @@
        {
            if (!isClientChangeMap)
            {
                StageLoadTimeOutCatcher.send0107Time = DateTime.Now;
                StageLoadTimeOutCatcher.ReportChangeMapRecord(this.socketType, "0107", DateTime.Now);
                StageLoadTimeOutCatcher.RecordProtocol(this.socketType, "0107", DateTime.Now);
                var mapOk = new C0107_tagCInitMapOK();
                mapOk.MapID = PlayerDatas.Instance.baseData.MapID;
System/Login/CrossServerLogin.cs
@@ -167,11 +167,11 @@
            try
            {
                StopLoginOverTimeProcess();
                loginOverTimeClock = Clock.Create(DateTime.Now + new TimeSpan(10* TimeSpan.TicksPerSecond), () =>
                {
                    busy = false;
                    ReAccountLogin();
                });
                loginOverTimeClock = Clock.Create(DateTime.Now + new TimeSpan(10 * TimeSpan.TicksPerSecond), () =>
                 {
                     busy = false;
                     ReAccountLogin();
                 });
                GameNetSystem.Instance.BeginConnectCrossServer(ipBuf, gamePortBuf, OnGameServerConnected);
                NetLinkWin.Show();
            }
@@ -245,7 +245,14 @@
        {
            StopLoginOverTimeProcess();
            busy = false;
            ExceptionCatcher.ReportException("登录跨服出现异常", StringUtility.Contact("角色:", PlayerDatas.Instance.baseData.PlayerName));
            ExceptionCatcher.ReportException("登录跨服出现异常",
                StringUtility.Contact(
                    "角色:", PlayerDatas.Instance.baseData.PlayerName, ";",
                    "本机网络:", Application.internetReachability, ";",
                    "Socket链接状态:", GameNetSystem.Instance.crossServerSocketConnected, ";",
                    "0102记录:", StageLoadTimeOutCatcher.got0102Time.ToString())
                );
            var sendInfo = new CC003_tagCGForceQuitCrossState();
            GameNetSystem.Instance.SendInfo(sendInfo);
            GameNetSystem.Instance.crossServerConnected_Loigc = false;
Utility/StageLoadTimeOutCatcher.cs
@@ -8,11 +8,11 @@
    const int timeOut = 20;//秒
    public static DateTime got0102Time = DateTime.MinValue;
    public static DateTime gotA126Time = DateTime.MinValue;
    public static DateTime gotA127Time = DateTime.MinValue;
    public static DateTime got0109Time = DateTime.MinValue;
    public static DateTime send0107Time = DateTime.MinValue;
    public static ProtocolRecorder got0102Time;
    public static ProtocolRecorder gotA126Time;
    public static ProtocolRecorder gotA127Time;
    public static ProtocolRecorder got0109Time;
    public static ProtocolRecorder send0107Time;
    public static StageLoadTimeOutCatcher Begin(int stageId)
    {
@@ -48,24 +48,45 @@
            var description = StringUtility.Contact(
                                        "开始时间:", startTime.ToString("HH:mm:ss"), ";",
                                        "超时时间:", DateTime.Now.ToString("HH:mm:ss"),
                                        "0102时间:", got0102Time.ToString("HH:mm:ss"), ";",
                                        "A126时间:", gotA126Time.ToString("HH:mm:ss"), ";",
                                        "A127时间:", gotA127Time.ToString("HH:mm:ss"), ";",
                                        "0109时间:", got0109Time.ToString("HH:mm:ss"), ";",
                                        "0107时间:", send0107Time.ToString("HH:mm:ss"));
                                        "0102记录:", got0102Time.ToString(), ";",
                                        "A126记录:", gotA126Time.ToString(), ";",
                                        "A127记录:", gotA127Time.ToString(), ";",
                                        "0109记录:", got0109Time.ToString(), ";",
                                        "0107记录:", send0107Time.ToString());
            ExceptionCatcher.ReportException(title, description);
            Stop();
        }
    }
    public static void ReportChangeMapRecord(GameNetSystem.SocketType socketType, string protocol, DateTime time)
    public static void RecordProtocol(GameNetSystem.SocketType socketType, string number, DateTime time)
    {
        var recorder = new ProtocolRecorder(number, time, socketType);
        switch (number)
        {
            case "0102":
                got0102Time = recorder;
                break;
            case "A126":
                gotA126Time = recorder;
                break;
            case "A127":
                gotA127Time = recorder;
                break;
            case "0109":
                got0109Time = recorder;
                break;
            case "0107":
                send0107Time = recorder;
                break;
            default:
                break;
        }
        try
        {
            var title = StringUtility.Contact("地图加载记录-->协议编号:", protocol);
            var description = StringUtility.Contact("服务器:", socketType, ";",
                "协议编号:", protocol, ";", "时间:", time.ToString("HH:mm:ss"), "玩家:", PlayerDatas.Instance.baseData.PlayerName);
            var title = StringUtility.Contact("地图加载记录-->封包编号:", number);
            var description = StringUtility.Contact(recorder.ToString(), "玩家:", PlayerDatas.Instance.baseData.PlayerName);
            ExceptionCatcher.ReportException(title, description);
        }
@@ -73,7 +94,25 @@
        {
        }
    }
    public struct ProtocolRecorder
    {
        public string number;
        public DateTime time;
        public GameNetSystem.SocketType socketType;
        public ProtocolRecorder(string number, DateTime time, GameNetSystem.SocketType socketType)
        {
            this.number = number;
            this.time = time;
            this.socketType = socketType;
        }
        public override string ToString()
        {
            return StringUtility.Contact("封包:", number, ";", "时间:", time.ToString("HH:mm:ss"), ";", "服务器:", socketType);
        }
    }
}