|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | # AA 10 节日祝福瓶选择奖励物品 #tagCMFeastWishBottleChooseItem | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagCMFeastWishBottleChooseItem(Structure): | 
|---|
|  |  |  | _pack_ = 1 | 
|---|
|  |  |  | _fields_ = [ | 
|---|
|  |  |  | ("Cmd", c_ubyte), | 
|---|
|  |  |  | ("SubCmd", c_ubyte), | 
|---|
|  |  |  | ("BottleNum", c_ubyte),    #瓶子编号 | 
|---|
|  |  |  | ("RecordIndex", c_ubyte),    #物品索引,用于选择及记录是否已选择 | 
|---|
|  |  |  | ] | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.Cmd = 0xAA | 
|---|
|  |  |  | self.SubCmd = 0x10 | 
|---|
|  |  |  | 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 = 0x10 | 
|---|
|  |  |  | self.BottleNum = 0 | 
|---|
|  |  |  | self.RecordIndex = 0 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | return sizeof(tagCMFeastWishBottleChooseItem) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | return string_at(addressof(self), self.GetLength()) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = '''// AA 10 节日祝福瓶选择奖励物品 //tagCMFeastWishBottleChooseItem: | 
|---|
|  |  |  | Cmd:%s, | 
|---|
|  |  |  | SubCmd:%s, | 
|---|
|  |  |  | BottleNum:%d, | 
|---|
|  |  |  | RecordIndex:%d | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.Cmd, | 
|---|
|  |  |  | self.SubCmd, | 
|---|
|  |  |  | self.BottleNum, | 
|---|
|  |  |  | self.RecordIndex | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagCMFeastWishBottleChooseItem=tagCMFeastWishBottleChooseItem() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMFeastWishBottleChooseItem.Cmd,m_NAtagCMFeastWishBottleChooseItem.SubCmd))] = m_NAtagCMFeastWishBottleChooseItem | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | # AA 11 节日祝福池祝福 #tagCMFeastWishPoolWish | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagCMFeastWishPoolWish(Structure): | 
|---|
|  |  |  | _pack_ = 1 | 
|---|
|  |  |  | _fields_ = [ | 
|---|
|  |  |  | ("Cmd", c_ubyte), | 
|---|
|  |  |  | ("SubCmd", c_ubyte), | 
|---|
|  |  |  | ("WishCount", c_ubyte),    #祝福次数 | 
|---|
|  |  |  | ] | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __init__(self): | 
|---|
|  |  |  | self.Clear() | 
|---|
|  |  |  | self.Cmd = 0xAA | 
|---|
|  |  |  | self.SubCmd = 0x11 | 
|---|
|  |  |  | 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 = 0x11 | 
|---|
|  |  |  | self.WishCount = 0 | 
|---|
|  |  |  | return | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetLength(self): | 
|---|
|  |  |  | return sizeof(tagCMFeastWishPoolWish) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def GetBuffer(self): | 
|---|
|  |  |  | return string_at(addressof(self), self.GetLength()) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def OutputString(self): | 
|---|
|  |  |  | DumpString = '''// AA 11 节日祝福池祝福 //tagCMFeastWishPoolWish: | 
|---|
|  |  |  | Cmd:%s, | 
|---|
|  |  |  | SubCmd:%s, | 
|---|
|  |  |  | WishCount:%d | 
|---|
|  |  |  | '''\ | 
|---|
|  |  |  | %( | 
|---|
|  |  |  | self.Cmd, | 
|---|
|  |  |  | self.SubCmd, | 
|---|
|  |  |  | self.WishCount | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return DumpString | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | m_NAtagCMFeastWishPoolWish=tagCMFeastWishPoolWish() | 
|---|
|  |  |  | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMFeastWishPoolWish.Cmd,m_NAtagCMFeastWishPoolWish.SubCmd))] = m_NAtagCMFeastWishPoolWish | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #------------------------------------------------------ | 
|---|
|  |  |  | # AA 05 限时抢购预约 #tagCMFlashSaleAppointment | 
|---|
|  |  |  |  | 
|---|
|  |  |  | class  tagCMFlashSaleAppointment(Structure): | 
|---|