From 35a907325bda76a0b97549e8c069cb8fe4464eb5 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期三, 20 三月 2024 13:50:16 +0800 Subject: [PATCH] 10138 内存分析(导出配置表注释加上字段类型备注) --- ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py | 192 +++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 191 insertions(+), 1 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py index cc8227f..f32553e 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py @@ -4723,6 +4723,84 @@ #------------------------------------------------------ +# A1 25 代币购买充值商品编号商品 #tagCMCoinBuyOrderInfo + +class tagCMCoinBuyOrderInfo(Structure): + Head = tagHead() + AppIDLen = 0 #(BYTE AppIDLen) + AppID = "" #(String AppID) + OrderInfoLen = 0 #(BYTE OrderInfoLen) + OrderInfo = "" #(String OrderInfo)//商品编号 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA1 + self.Head.SubCmd = 0x25 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.AppIDLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.AppID,_pos = CommFunc.ReadString(_lpData, _pos,self.AppIDLen) + self.OrderInfoLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.OrderInfo,_pos = CommFunc.ReadString(_lpData, _pos,self.OrderInfoLen) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA1 + self.Head.SubCmd = 0x25 + self.AppIDLen = 0 + self.AppID = "" + self.OrderInfoLen = 0 + self.OrderInfo = "" + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += len(self.AppID) + length += 1 + length += len(self.OrderInfo) + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.AppIDLen) + data = CommFunc.WriteString(data, self.AppIDLen, self.AppID) + data = CommFunc.WriteBYTE(data, self.OrderInfoLen) + data = CommFunc.WriteString(data, self.OrderInfoLen, self.OrderInfo) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + AppIDLen:%d, + AppID:%s, + OrderInfoLen:%d, + OrderInfo:%s + '''\ + %( + self.Head.OutputString(), + self.AppIDLen, + self.AppID, + self.OrderInfoLen, + self.OrderInfo + ) + return DumpString + + +m_NAtagCMCoinBuyOrderInfo=tagCMCoinBuyOrderInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMCoinBuyOrderInfo.Head.Cmd,m_NAtagCMCoinBuyOrderInfo.Head.SubCmd))] = m_NAtagCMCoinBuyOrderInfo + + +#------------------------------------------------------ # A1 20 货币兑换 #tagCMMoneyExchange class tagCMMoneyExchange(Structure): @@ -4910,7 +4988,7 @@ _fields_ = [ ("Cmd", c_ubyte), ("SubCmd", c_ubyte), - ("RecordID", c_ubyte), #充值记录ID,也就是充值ID,发0则查全部 + ("RecordID", c_ushort), #充值记录ID,也就是充值ID,发0则查全部 ] def __init__(self): @@ -15062,6 +15140,118 @@ #------------------------------------------------------ +# AA 24 Boss历练领奖 #tagCMActBossTrialGetAward + +class tagCMActBossTrialGetAward(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("ActNum", c_ubyte), #活动编号 + ("SubmitCount", c_ushort), #领取凭证个数对应奖励 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xAA + self.SubCmd = 0x24 + 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.Cmd = 0xAA + self.SubCmd = 0x24 + self.ActNum = 0 + self.SubmitCount = 0 + return + + def GetLength(self): + return sizeof(tagCMActBossTrialGetAward) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 24 Boss历练领奖 //tagCMActBossTrialGetAward: + Cmd:%s, + SubCmd:%s, + ActNum:%d, + SubmitCount:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.ActNum, + self.SubmitCount + ) + return DumpString + + +m_NAtagCMActBossTrialGetAward=tagCMActBossTrialGetAward() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMActBossTrialGetAward.Cmd,m_NAtagCMActBossTrialGetAward.SubCmd))] = m_NAtagCMActBossTrialGetAward + + +#------------------------------------------------------ +# AA 23 Boss历练提交凭证 #tagCMActBossTrialSubmit + +class tagCMActBossTrialSubmit(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("ActNum", c_ubyte), #活动编号 + ("SubmitCount", c_ushort), #提交凭证个数 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xAA + self.SubCmd = 0x23 + 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.Cmd = 0xAA + self.SubCmd = 0x23 + self.ActNum = 0 + self.SubmitCount = 0 + return + + def GetLength(self): + return sizeof(tagCMActBossTrialSubmit) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 23 Boss历练提交凭证 //tagCMActBossTrialSubmit: + Cmd:%s, + SubCmd:%s, + ActNum:%d, + SubmitCount:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.ActNum, + self.SubmitCount + ) + return DumpString + + +m_NAtagCMActBossTrialSubmit=tagCMActBossTrialSubmit() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMActBossTrialSubmit.Cmd,m_NAtagCMActBossTrialSubmit.SubCmd))] = m_NAtagCMActBossTrialSubmit + + +#------------------------------------------------------ # AA 09 集字活动兑换 #tagCMActCollectWordsExchange class tagCMActCollectWordsExchange(Structure): -- Gitblit v1.8.0