From e102e4a814c25aa42017ac962d88bfbfc8d279de Mon Sep 17 00:00:00 2001
From: client_Hale <339726288@qq.com>
Date: 星期三, 09 一月 2019 15:29:05 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
---
Utility/StageLoadTimeOutCatcher.cs | 67 ++++++++++++++++++++++++++-------
1 files changed, 53 insertions(+), 14 deletions(-)
diff --git a/Utility/StageLoadTimeOutCatcher.cs b/Utility/StageLoadTimeOutCatcher.cs
index 1652b5c..1a7fed6 100644
--- a/Utility/StageLoadTimeOutCatcher.cs
+++ b/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);
+ }
}
}
--
Gitblit v1.8.0