From a7e72a169ff9fbd6d9d061f7352a130b8d53f9a6 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期五, 16 五月 2025 15:46:43 +0800 Subject: [PATCH] 16 卡牌服务端(排行榜) --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py | 72 ++++++++++++++++++++++++++++++++++++ 1 files changed, 72 insertions(+), 0 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py index fa57fb5..4d586a9 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py @@ -6229,6 +6229,78 @@ #------------------------------------------------------ +# 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): -- Gitblit v1.8.0