| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A1 26 充值自选物品选择 #tagCMSelectCTGItem
|
| | |
|
| | | class tagCMSelectCTGItem(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("RecordID", c_ushort), #充值ID
|
| | | ("SelectItemValue", c_int), # 自选物品索引值,每两位存储每个自选索引对应选择的物品索引+1,存储位值为0代表未选择,最多支持选择4种物品
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA1
|
| | | self.SubCmd = 0x26
|
| | | 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 = 0xA1
|
| | | self.SubCmd = 0x26
|
| | | self.RecordID = 0
|
| | | self.SelectItemValue = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMSelectCTGItem)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A1 26 充值自选物品选择 //tagCMSelectCTGItem:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | RecordID:%d,
|
| | | SelectItemValue:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.RecordID,
|
| | | self.SelectItemValue
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMSelectCTGItem=tagCMSelectCTGItem()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMSelectCTGItem.Cmd,m_NAtagCMSelectCTGItem.SubCmd))] = m_NAtagCMSelectCTGItem
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #A1 03 设置是否成年 #tagCMAdult
|
| | |
|
| | | class tagCMAdult(Structure):
|