| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A1 30 查看榜单 #tagCMViewBillboard
|
| | |
|
| | | class tagCMViewBillboard(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("Type", c_ubyte), #榜单类型
|
| | | ("GroupValue1", c_int), #分组值1
|
| | | ("GroupValue2", c_int), #分组值2,与分组值1组合归为同组榜单数据
|
| | | ("StartIndex", c_ushort), #查看的起始名次索引, 默认0
|
| | | ("ViewCnt", c_ubyte), #查看条数,默认20,单次最大不超过100
|
| | | ("ViewID", c_int), #附带查看指定ID所在名次前后数据,如玩家ID、家族ID等,仅首页查询时有效,即StartIndex为0时
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA1
|
| | | self.SubCmd = 0x30
|
| | | 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 = 0x30
|
| | | self.Type = 0
|
| | | self.GroupValue1 = 0
|
| | | self.GroupValue2 = 0
|
| | | self.StartIndex = 0
|
| | | self.ViewCnt = 0
|
| | | self.ViewID = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMViewBillboard)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A1 30 查看榜单 //tagCMViewBillboard:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | Type:%d,
|
| | | GroupValue1:%d,
|
| | | GroupValue2:%d,
|
| | | StartIndex:%d,
|
| | | ViewCnt:%d,
|
| | | ViewID:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.Type,
|
| | | self.GroupValue1,
|
| | | self.GroupValue2,
|
| | | self.StartIndex,
|
| | | self.ViewCnt,
|
| | | self.ViewID
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMViewBillboard=tagCMViewBillboard()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMViewBillboard.Cmd,m_NAtagCMViewBillboard.SubCmd))] = m_NAtagCMViewBillboard
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A2 19 游戏建议收集 #tagCMAdviceSubmit
|
| | |
|
| | | class tagCMAdviceSubmit(Structure):
|