| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AA 16 通知超值礼包信息 #tagMCSuperGiftInfo
|
| | |
|
| | | class tagMCSuperGiftInfo(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("GiftID", c_int), #商品ID
|
| | | ("RemainDay", c_ubyte), #剩余天数
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xAA
|
| | | 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 = 0xAA
|
| | | self.SubCmd = 0x16
|
| | | self.GiftID = 0
|
| | | self.RemainDay = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCSuperGiftInfo)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 16 通知超值礼包信息 //tagMCSuperGiftInfo:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | GiftID:%d,
|
| | | RemainDay:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.GiftID,
|
| | | self.RemainDay
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCSuperGiftInfo=tagMCSuperGiftInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCSuperGiftInfo.Cmd,m_NAtagMCSuperGiftInfo.SubCmd))] = m_NAtagMCSuperGiftInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #AA 01 累计登陆天数信息 #tagMCTotalLoginDayCntInfo
|
| | |
|
| | | class tagMCTotalLoginDayCntInfo(Structure):
|