From f10b4418d4b543e77dadf11730ddd7636c11cf79 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期三, 20 十一月 2019 19:55:24 +0800 Subject: [PATCH] 8341 【恺英】【后端】强化进化系统优化(强化大师) --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py | 108 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 108 insertions(+), 0 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py index a406404..b5df0a7 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py @@ -15932,6 +15932,114 @@ #------------------------------------------------------ +# A3 C2 大师强化等级激活信息 #tagMCMasterPlusLVInfo + +class tagMCMasterPlusLV(Structure): + _pack_ = 1 + _fields_ = [ + ("ClassLV", c_ubyte), + ("MasterPlusLV", c_ushort), # 已经激活的最高大师强化等级,向下兼容 + ] + + def __init__(self): + self.Clear() + return + + def ReadData(self, stringData, _pos=0, _len=0): + self.Clear() + memmove(addressof(self), stringData[_pos:], self.GetLength()) + return _pos + self.GetLength() + + def Clear(self): + self.ClassLV = 0 + self.MasterPlusLV = 0 + return + + def GetLength(self): + return sizeof(tagMCMasterPlusLV) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A3 C2 大师强化等级激活信息 //tagMCMasterPlusLVInfo: + ClassLV:%d, + MasterPlusLV:%d + '''\ + %( + self.ClassLV, + self.MasterPlusLV + ) + return DumpString + + +class tagMCMasterPlusLVInfo(Structure): + Head = tagHead() + Count = 0 #(BYTE Count)// 信息个数 + MasterPlusLVInfoList = list() #(vector<tagMCMasterPlusLV> MasterPlusLVInfoList)// 信息列表 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA3 + self.Head.SubCmd = 0xC2 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.Count): + temMasterPlusLVInfoList = tagMCMasterPlusLV() + _pos = temMasterPlusLVInfoList.ReadData(_lpData, _pos) + self.MasterPlusLVInfoList.append(temMasterPlusLVInfoList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA3 + self.Head.SubCmd = 0xC2 + self.Count = 0 + self.MasterPlusLVInfoList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + for i in range(self.Count): + length += self.MasterPlusLVInfoList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.Count) + for i in range(self.Count): + data = CommFunc.WriteString(data, self.MasterPlusLVInfoList[i].GetLength(), self.MasterPlusLVInfoList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + Count:%d, + MasterPlusLVInfoList:%s + '''\ + %( + self.Head.OutputString(), + self.Count, + "..." + ) + return DumpString + + +m_NAtagMCMasterPlusLVInfo=tagMCMasterPlusLVInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCMasterPlusLVInfo.Head.Cmd,m_NAtagMCMasterPlusLVInfo.Head.SubCmd))] = m_NAtagMCMasterPlusLVInfo + + +#------------------------------------------------------ #A3 1B 玩家自动战斗设置储存信息通知#tagMCAutoFightSetting class tagMCAutoFightSetting(Structure): -- Gitblit v1.8.0