| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A5 32 购买商城物品 #tagCMBuyStoreItem
|
| | |
|
| | | class tagCMBuyStoreItem(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("Type", c_ubyte), #1钻石,2绑定钻石,3银子,4银票
|
| | | ("ItemID", c_int), #物品ID
|
| | | ("BuyCount", c_ushort), #购买数量
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA5
|
| | | self.SubCmd = 0x32
|
| | | 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 = 0x32
|
| | | self.Type = 0
|
| | | self.ItemID = 0
|
| | | self.BuyCount = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMBuyStoreItem)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A5 32 购买商城物品 //tagCMBuyStoreItem:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | Type:%d,
|
| | | ItemID:%d,
|
| | | BuyCount:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.Type,
|
| | | self.ItemID,
|
| | | self.BuyCount
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMBuyStoreItem=tagCMBuyStoreItem()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMBuyStoreItem.Cmd,m_NAtagCMBuyStoreItem.SubCmd))] = m_NAtagCMBuyStoreItem
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #A5 01 坐骑激活 #tagPlayerActivateHorse
|
| | |
|
| | | class tagPlayerActivateHorse(Structure):
|