| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A5 30 购买魔魂铜钱经验什么的 #tagCMBuySomething
|
| | |
|
| | | class tagCMBuySomething(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("Type", c_ubyte), #14铜钱,15经验
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA5
|
| | | self.SubCmd = 0x30
|
| | | 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 = 0xA5
|
| | | self.SubCmd = 0x30
|
| | | self.Type = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMBuySomething)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A5 30 购买魔魂铜钱经验什么的 //tagCMBuySomething:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | Type:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.Type
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMBuySomething=tagCMBuySomething()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMBuySomething.Cmd,m_NAtagCMBuySomething.SubCmd))] = m_NAtagCMBuySomething
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #A5 01 坐骑激活 #tagPlayerActivateHorse
|
| | |
|
| | | class tagPlayerActivateHorse(Structure):
|