From c3df46d41e1e2db96343c856e44f516495eef90f Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期二, 20 十月 2020 09:43:00 +0800 Subject: [PATCH] 4805 【BT】日常活动邮件内容都是天降宝箱 需要优化(屏蔽邮件) --- ServerPython/CoreServerGroup/GameServer/Script/PyGameDataStruct.py | 20 +++++++++++++------- 1 files changed, 13 insertions(+), 7 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/PyGameDataStruct.py b/ServerPython/CoreServerGroup/GameServer/Script/PyGameDataStruct.py index 1bad1e7..e5a824c 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/PyGameDataStruct.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/PyGameDataStruct.py @@ -32,6 +32,7 @@ ('NPCID', ctypes.c_ulong), ('ExDataLen', ctypes.c_ushort), ('ExData', ctypes.c_char_p), + ('DailyDateStr', ctypes.c_char * 10), ('TimeStr', ctypes.c_char * 19), ('ThanksState', ctypes.c_ubyte), ('AssistPlayerLen', ctypes.c_ushort), @@ -57,6 +58,7 @@ self.NPCID = 0 self.ExDataLen = 0 self.ExData = '' + self.DailyDateStr = '' self.TimeStr = '' self.ThanksState = 0 self.AssistPlayerLen = 0 @@ -82,6 +84,7 @@ self.ExDataLen, pos = CommFunc.ReadWORD(buf, pos) tmp, pos = CommFunc.ReadString(buf, pos, self.ExDataLen) self.ExData = ctypes.c_char_p(tmp) + self.DailyDateStr, pos = CommFunc.ReadString(buf, pos, 10) self.TimeStr, pos = CommFunc.ReadString(buf, pos, 19) self.ThanksState, pos = CommFunc.ReadBYTE(buf, pos) self.AssistPlayerLen, pos = CommFunc.ReadWORD(buf, pos) @@ -104,6 +107,7 @@ buf = CommFunc.WriteDWORD(buf, self.NPCID) buf = CommFunc.WriteWORD(buf, self.ExDataLen) buf = CommFunc.WriteString(buf, self.ExDataLen, self.ExData) + buf = CommFunc.WriteString(buf, sizeof(ctypes.c_char) * 10, self.DailyDateStr) buf = CommFunc.WriteString(buf, sizeof(ctypes.c_char) * 19, self.TimeStr) buf = CommFunc.WriteBYTE(buf, self.ThanksState) buf = CommFunc.WriteWORD(buf, self.AssistPlayerLen) @@ -125,6 +129,7 @@ length += sizeof(ctypes.c_ulong) length += sizeof(ctypes.c_ushort) length += self.ExDataLen + length += sizeof(ctypes.c_char) * 10 length += sizeof(ctypes.c_char) * 19 length += sizeof(ctypes.c_ubyte) length += sizeof(ctypes.c_ushort) @@ -146,6 +151,7 @@ NPCID = %s, ExDataLen = %s, ExData = %s, + DailyDateStr = %s, TimeStr = %s, ThanksState = %s, AssistPlayerLen = %s, @@ -165,6 +171,7 @@ self.NPCID, self.ExDataLen, self.ExData, + self.DailyDateStr, self.TimeStr, self.ThanksState, self.AssistPlayerLen, @@ -186,6 +193,12 @@ else: self.PlayerName = Str[:33] + def SetDailyDateStr(self,Str): + if len(Str)<=10: + self.DailyDateStr = Str + else: + self.DailyDateStr = Str[:10] + def SetTimeStr(self,Str): if len(Str)<=19: self.TimeStr = Str @@ -204,7 +217,6 @@ ('Job', ctypes.c_ubyte), ('LV', ctypes.c_ushort), ('RealmLV', ctypes.c_ubyte), - ('AssistType', ctypes.c_ubyte), ('MapID', ctypes.c_ulong), ('LineID', ctypes.c_ulong), ('NPCID', ctypes.c_ulong), @@ -225,7 +237,6 @@ self.Job = 0 self.LV = 0 self.RealmLV = 0 - self.AssistType = 0 self.MapID = 0 self.LineID = 0 self.NPCID = 0 @@ -245,7 +256,6 @@ self.Job, pos = CommFunc.ReadBYTE(buf, pos) self.LV, pos = CommFunc.ReadWORD(buf, pos) self.RealmLV, pos = CommFunc.ReadBYTE(buf, pos) - self.AssistType, pos = CommFunc.ReadBYTE(buf, pos) self.MapID, pos = CommFunc.ReadDWORD(buf, pos) self.LineID, pos = CommFunc.ReadDWORD(buf, pos) self.NPCID, pos = CommFunc.ReadDWORD(buf, pos) @@ -263,7 +273,6 @@ buf = CommFunc.WriteBYTE(buf, self.Job) buf = CommFunc.WriteWORD(buf, self.LV) buf = CommFunc.WriteBYTE(buf, self.RealmLV) - buf = CommFunc.WriteBYTE(buf, self.AssistType) buf = CommFunc.WriteDWORD(buf, self.MapID) buf = CommFunc.WriteDWORD(buf, self.LineID) buf = CommFunc.WriteDWORD(buf, self.NPCID) @@ -279,7 +288,6 @@ length += sizeof(ctypes.c_char) * 33 length += sizeof(ctypes.c_ubyte) length += sizeof(ctypes.c_ushort) - length += sizeof(ctypes.c_ubyte) length += sizeof(ctypes.c_ubyte) length += sizeof(ctypes.c_ulong) length += sizeof(ctypes.c_ulong) @@ -297,7 +305,6 @@ Job = %s, LV = %s, RealmLV = %s, - AssistType = %s, MapID = %s, LineID = %s, NPCID = %s, @@ -312,7 +319,6 @@ self.Job, self.LV, self.RealmLV, - self.AssistType, self.MapID, self.LineID, self.NPCID, -- Gitblit v1.8.0