| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #A3 21 使用特殊运营物品 #tagCMUseSpecialItem
|
| | |
|
| | | class tagCMUseSpecialItem(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("SpeicalItemType", c_ubyte), #特殊运营物品类型,0打折卡,1多选礼包
|
| | | ("ItemID", c_int), #物品ID
|
| | | ("ItemIndex", c_ubyte), #物品在背包中的索引位置
|
| | | ("Select", c_ubyte), #选择,只对多选礼包有用 |
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA3
|
| | | self.SubCmd = 0x21
|
| | | 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 = 0xA3
|
| | | self.SubCmd = 0x21
|
| | | self.SpeicalItemType = 0
|
| | | self.ItemID = 0
|
| | | self.ItemIndex = 0
|
| | | self.Select = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMUseSpecialItem)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''//A3 21 使用特殊运营物品 //tagCMUseSpecialItem:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | SpeicalItemType:%d,
|
| | | ItemID:%d,
|
| | | ItemIndex:%d,
|
| | | Select:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.SpeicalItemType,
|
| | | self.ItemID,
|
| | | self.ItemIndex,
|
| | | self.Select
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMUseSpecialItem=tagCMUseSpecialItem()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMUseSpecialItem.Cmd,m_NAtagCMUseSpecialItem.SubCmd))] = m_NAtagCMUseSpecialItem
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A3 2F 宗门试炼兑换 #tagCMTrialExchange
|
| | |
|
| | | class tagCMTrialExchange(Structure):
|