ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -14398,6 +14398,261 @@
#------------------------------------------------------
# A9 24 群英榜匹配玩家列表 #tagSCQunyingMatchList
class  tagSCQunyingMatchInfo(Structure):
    Rank = 0    #(WORD Rank)//排名,从1开始
    PlayerID = 0    #(DWORD PlayerID)//目标玩家ID
    PlayerName = ""    #(char PlayerName[33])
    LV = 0    #(WORD LV)// 玩家等级
    RealmLV = 0    #(WORD RealmLV)//境界,机器人读境界表取等级对应境界
    FightPower = 0    #(DWORD FightPower)//战力求余亿部分
    FightPowerEx = 0    #(DWORD FightPowerEx)//战力整除亿部分
    Face = 0    #(DWORD Face)//基本脸型
    FacePic = 0    #(DWORD FacePic)//头像框
    TitleID = 0    #(DWORD TitleID)//称号
    ModelMark = 0    #(DWORD ModelMark)//变形模型mark
    EquipShowSwitch = 0    #(DWORD EquipShowSwitch)//其他外观信息
    ServerID = 0    #(DWORD ServerID)
    data = None
    def __init__(self):
        self.Clear()
        return
    def ReadData(self, _lpData, _pos=0, _Len=0):
        self.Clear()
        self.Rank,_pos = CommFunc.ReadWORD(_lpData, _pos)
        self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
        self.PlayerName,_pos = CommFunc.ReadString(_lpData, _pos,33)
        self.LV,_pos = CommFunc.ReadWORD(_lpData, _pos)
        self.RealmLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
        self.FightPower,_pos = CommFunc.ReadDWORD(_lpData, _pos)
        self.FightPowerEx,_pos = CommFunc.ReadDWORD(_lpData, _pos)
        self.Face,_pos = CommFunc.ReadDWORD(_lpData, _pos)
        self.FacePic,_pos = CommFunc.ReadDWORD(_lpData, _pos)
        self.TitleID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
        self.ModelMark,_pos = CommFunc.ReadDWORD(_lpData, _pos)
        self.EquipShowSwitch,_pos = CommFunc.ReadDWORD(_lpData, _pos)
        self.ServerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
        return _pos
    def Clear(self):
        self.Rank = 0
        self.PlayerID = 0
        self.PlayerName = ""
        self.LV = 0
        self.RealmLV = 0
        self.FightPower = 0
        self.FightPowerEx = 0
        self.Face = 0
        self.FacePic = 0
        self.TitleID = 0
        self.ModelMark = 0
        self.EquipShowSwitch = 0
        self.ServerID = 0
        return
    def GetLength(self):
        length = 0
        length += 2
        length += 4
        length += 33
        length += 2
        length += 2
        length += 4
        length += 4
        length += 4
        length += 4
        length += 4
        length += 4
        length += 4
        length += 4
        return length
    def GetBuffer(self):
        data = ''
        data = CommFunc.WriteWORD(data, self.Rank)
        data = CommFunc.WriteDWORD(data, self.PlayerID)
        data = CommFunc.WriteString(data, 33, self.PlayerName)
        data = CommFunc.WriteWORD(data, self.LV)
        data = CommFunc.WriteWORD(data, self.RealmLV)
        data = CommFunc.WriteDWORD(data, self.FightPower)
        data = CommFunc.WriteDWORD(data, self.FightPowerEx)
        data = CommFunc.WriteDWORD(data, self.Face)
        data = CommFunc.WriteDWORD(data, self.FacePic)
        data = CommFunc.WriteDWORD(data, self.TitleID)
        data = CommFunc.WriteDWORD(data, self.ModelMark)
        data = CommFunc.WriteDWORD(data, self.EquipShowSwitch)
        data = CommFunc.WriteDWORD(data, self.ServerID)
        return data
    def OutputString(self):
        DumpString = '''
                                Rank:%d,
                                PlayerID:%d,
                                PlayerName:%s,
                                LV:%d,
                                RealmLV:%d,
                                FightPower:%d,
                                FightPowerEx:%d,
                                Face:%d,
                                FacePic:%d,
                                TitleID:%d,
                                ModelMark:%d,
                                EquipShowSwitch:%d,
                                ServerID:%d
                                '''\
                                %(
                                self.Rank,
                                self.PlayerID,
                                self.PlayerName,
                                self.LV,
                                self.RealmLV,
                                self.FightPower,
                                self.FightPowerEx,
                                self.Face,
                                self.FacePic,
                                self.TitleID,
                                self.ModelMark,
                                self.EquipShowSwitch,
                                self.ServerID
                                )
        return DumpString
class  tagSCQunyingMatchList(Structure):
    Head = tagHead()
    MatchCount = 0    #(BYTE MatchCount)
    MatchList = list()    #(vector<tagSCQunyingMatchInfo> MatchList)// 匹配列表,从高分到低分
    data = None
    def __init__(self):
        self.Clear()
        self.Head.Cmd = 0xA9
        self.Head.SubCmd = 0x24
        return
    def ReadData(self, _lpData, _pos=0, _Len=0):
        self.Clear()
        _pos = self.Head.ReadData(_lpData, _pos)
        self.MatchCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        for i in range(self.MatchCount):
            temMatchList = tagSCQunyingMatchInfo()
            _pos = temMatchList.ReadData(_lpData, _pos)
            self.MatchList.append(temMatchList)
        return _pos
    def Clear(self):
        self.Head = tagHead()
        self.Head.Clear()
        self.Head.Cmd = 0xA9
        self.Head.SubCmd = 0x24
        self.MatchCount = 0
        self.MatchList = list()
        return
    def GetLength(self):
        length = 0
        length += self.Head.GetLength()
        length += 1
        for i in range(self.MatchCount):
            length += self.MatchList[i].GetLength()
        return length
    def GetBuffer(self):
        data = ''
        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
        data = CommFunc.WriteBYTE(data, self.MatchCount)
        for i in range(self.MatchCount):
            data = CommFunc.WriteString(data, self.MatchList[i].GetLength(), self.MatchList[i].GetBuffer())
        return data
    def OutputString(self):
        DumpString = '''
                                Head:%s,
                                MatchCount:%d,
                                MatchList:%s
                                '''\
                                %(
                                self.Head.OutputString(),
                                self.MatchCount,
                                "..."
                                )
        return DumpString
m_NAtagSCQunyingMatchList=tagSCQunyingMatchList()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCQunyingMatchList.Head.Cmd,m_NAtagSCQunyingMatchList.Head.SubCmd))] = m_NAtagSCQunyingMatchList
#------------------------------------------------------
# A9 25 群英榜玩家信息 #tagSCQunyingPlayerInfo
class  tagSCQunyingPlayerInfo(Structure):
    _pack_ = 1
    _fields_ = [
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ("RefreshCnt", c_int),    # 本周已刷新匹配次数
                  ("LastRecoverTime", c_int),    # 上次免费恢复挑战令时间戳,为0时可不用倒计时
                  ("RankHighest", c_ushort),    # 历史最高名次,第1名为最高
                  ("RankSuccAward", c_int),    # 历史最高名次成就领奖记录,按奖励记录索引位运算记录是否已领取
                  ]
    def __init__(self):
        self.Clear()
        self.Cmd = 0xA9
        self.SubCmd = 0x25
        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 = 0xA9
        self.SubCmd = 0x25
        self.RefreshCnt = 0
        self.LastRecoverTime = 0
        self.RankHighest = 0
        self.RankSuccAward = 0
        return
    def GetLength(self):
        return sizeof(tagSCQunyingPlayerInfo)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// A9 25 群英榜玩家信息 //tagSCQunyingPlayerInfo:
                                Cmd:%s,
                                SubCmd:%s,
                                RefreshCnt:%d,
                                LastRecoverTime:%d,
                                RankHighest:%d,
                                RankSuccAward:%d
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd,
                                self.RefreshCnt,
                                self.LastRecoverTime,
                                self.RankHighest,
                                self.RankSuccAward
                                )
        return DumpString
m_NAtagSCQunyingPlayerInfo=tagSCQunyingPlayerInfo()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCQunyingPlayerInfo.Cmd,m_NAtagSCQunyingPlayerInfo.SubCmd))] = m_NAtagSCQunyingPlayerInfo
#------------------------------------------------------
# A9 21 角色改名结果 #tagSCRenameResult
class  tagSCRenameResult(Structure):