From bb284affe6541fa85c492ce9af26b4ee35805aab Mon Sep 17 00:00:00 2001 From: hch <305670599@qq.com> Date: 星期二, 12 三月 2019 14:25:07 +0800 Subject: [PATCH] 6328 【后端】优化代码eval -- 玩家缓存数据提取常用字段 等级和最后一次发送时间 --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChMapToGamePyPack.py | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChMapToGamePyPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChMapToGamePyPack.py index 7e666f7..741718a 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChMapToGamePyPack.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChMapToGamePyPack.py @@ -672,6 +672,7 @@ PlusDataSize = 0 #(DWORD PlusDataSize) PlusData = "" #(String PlusData)//扩展记录 IsLogouting = 0 #(BYTE IsLogouting)//本次是否为下线同步 + OffTime = 0 #(DWORD OffTime)// 下线时间戳 data = None def __init__(self): @@ -692,6 +693,7 @@ self.PlusDataSize,_pos = CommFunc.ReadDWORD(_lpData, _pos) self.PlusData,_pos = CommFunc.ReadString(_lpData, _pos,self.PlusDataSize) self.IsLogouting,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.OffTime,_pos = CommFunc.ReadDWORD(_lpData, _pos) return _pos def Clear(self): @@ -708,6 +710,7 @@ self.PlusDataSize = 0 self.PlusData = "" self.IsLogouting = 0 + self.OffTime = 0 return def GetLength(self): @@ -722,6 +725,7 @@ length += 4 length += len(self.PlusData) length += 1 + length += 4 return length @@ -737,6 +741,7 @@ data = CommFunc.WriteDWORD(data, self.PlusDataSize) data = CommFunc.WriteString(data, self.PlusDataSize, self.PlusData) data = CommFunc.WriteBYTE(data, self.IsLogouting) + data = CommFunc.WriteDWORD(data, self.OffTime) return data def OutputString(self): @@ -750,7 +755,8 @@ ItemData:%s, PlusDataSize:%d, PlusData:%s, - IsLogouting:%d + IsLogouting:%d, + OffTime:%d '''\ %( self.Head.OutputString(), @@ -762,7 +768,8 @@ self.ItemData, self.PlusDataSize, self.PlusData, - self.IsLogouting + self.IsLogouting, + self.OffTime ) return DumpString -- Gitblit v1.8.0