| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A6 16 珍宝阁操作 #tagCMZhenbaogeOP
|
| | |
|
| | | class tagCMZhenbaogeOP(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("OpType", c_ubyte), # 操作:0-砍价;1-购买
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA6
|
| | | self.SubCmd = 0x16
|
| | | 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 = 0xA6
|
| | | self.SubCmd = 0x16
|
| | | self.OpType = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMZhenbaogeOP)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A6 16 珍宝阁操作 //tagCMZhenbaogeOP:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | OpType:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.OpType
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMZhenbaogeOP=tagCMZhenbaogeOP()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMZhenbaogeOP.Cmd,m_NAtagCMZhenbaogeOP.SubCmd))] = m_NAtagCMZhenbaogeOP
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A7 02 宠物激活 #tagCMActivatePet
|
| | |
|
| | | class tagCMActivatePet(Structure):
|