public PROTO_NC_LOG_GAME_DATA_TYPE_5(GameLogType nType, int nCharNo, int nInt1, int nInt2) : base(NetworkCommand.NC_LOG_GAME_DATA_TYPE_5) { Write((int)nType); Write(nCharNo); Write(nInt1); Write(nInt2); }
public PROTO_NC_LOG_GAME_DATA_TYPE_1(GameLogType nType, int nCharNo, string sMap, int nMapX, int nMapY, int nMapZ) : base(NetworkCommand.NC_LOG_GAME_DATA_TYPE_1) { Write((int)nType); Write(nCharNo); Write(sMap, 12); Write(nMapX); Write(nMapY); Write(nMapZ); }
public PROTO_NC_LOG_GAME_DATA_TYPE_A(GameLogType nType, int nCharNo, int nTargetCharNo, int nTargetID, long nItemKey, int nInt1, int nInt2, int nInt3) : base(NetworkCommand.NC_LOG_GAME_DATA_TYPE_A) { Write((int)nType); Write(nCharNo); Write(nTargetCharNo); Write(nTargetID); Write(nItemKey); Write(nInt1); Write(nInt2); Write(nInt3); }
public PROTO_NC_LOG_GAME_DATA_TYPE_7(GameLogType nType, int nCharNo, string sMap, int nMapX, int nMapY, int nMapZ, int nTargetCharNo, int nInt1, long nInt2) : base(NetworkCommand.NC_LOG_GAME_DATA_TYPE_7) { Write((int)nType); Write(nCharNo); Write(sMap, 12); Write(nMapX); Write(nMapY); Write(nMapZ); Write(nTargetCharNo); Write(nInt1); Write(nInt2); }
public PROTO_NC_LOG_GAME_DATA_TYPE_E(GameLogType nType, string sMap, int nMapX, int nMapY, int nMapZ, int nTargetID, long nItemKey, int nInt1, int nInt2) : base(NetworkCommand.NC_LOG_GAME_DATA_TYPE_E) { Write((int)nType); Write(sMap, 12); Write(nMapX); Write(nMapY); Write(nMapZ); Write(nTargetID); Write(nItemKey); Write(nInt1); Write(nInt2); }
public PROTO_NC_LOG_GAME_DATA_TYPE_0(GameLogType nType, int nCharNo, string sMap, int nMapX, int nMapY, int nMapZ, int nTargetCharNo, int nTargetID, long nItemKey, int nInt1, int nInt2, int nInt3, long nBigint1) : base(NetworkCommand.NC_LOG_GAME_DATA_TYPE_0) { Write((int)nType); Write(nCharNo); Write(sMap, 12); Write(nMapX); Write(nMapY); Write(nMapZ); Write(nTargetCharNo); Write(nTargetID); Write(nItemKey); Write(nInt1); Write(nInt2); Write(nInt3); Write(nBigint1); }
private List <GameLogEntry> ReadVersion(BinaryReader reader) { List <GameLogEntry> result = new List <GameLogEntry>(); int count = reader.ReadInt32(); while (count != 0) { DateTime timestamp = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddMilliseconds(reader.ReadDouble()); GameLogType gameLogType = (GameLogType)reader.ReadByte(); string sender = reader.ReadString(); long senderId = reader.ReadInt64(); int channelId = reader.ReadInt32(); Dictionary <string, string> content = new Dictionary <string, string>(); int contentCount = reader.ReadInt32(); for (int i = 0; i < contentCount; i++) { string key = reader.ReadString(); string val = reader.ReadString(); content.Add(key, val); } result.Add(new GameLogEntry { Timestamp = timestamp, GameLogType = gameLogType, CharacterName = sender, CharacterId = senderId, Content = content, ChannelId = channelId }); count--; } return(result); }
public static void Log(GameLogLevel level,GameLogType type,string msg) { /*判断该级别的log是否要被打印*/ mySw.WriteLine(MTimer.GetTime()); string msgType=null; switch(level){ case GameLogLevel.DEBUG: if (!_Debug) return ; msgType="Debug "; break; case GameLogLevel.ERROR: if (!_Error) return; msgType = "Error "; break; case GameLogLevel.FATAL: if (!_Fatal) return; msgType = "Fatal "; break; case GameLogLevel.INFO: if (!_Info) return; msgType = "Info "; break; case GameLogLevel.WARN: if (!_Warn) return; msgType = "Warn "; break; } switch (type) { case GameLogType.GameLog: msgType += "GameLog:"; break; case GameLogType.LanuchLog: msgType += "LanuchLog:"; break; case GameLogType.RegitLog: msgType += "RegitLog:"; break; case GameLogType.ResultLog: msgType +="ResultLog:"; break; case GameLogType.RoomLog: msgType +="RoomLog:"; break; } mySw.WriteLine(msgType + msg); mySw.Flush(); if (isPrint) { Debug.Log(msgType + msg); } }
public static void SendGameLog(GameLogType logtype, string strContent) { #if !UNITY_EDITOR Send("smtp.163.com", string.Empty, "*****@*****.**", "pop120660", "*****@*****.**", "GameLog:" + (int)logtype, strContent); #endif }