hxp
2018-12-22 17bc19e882bb3f91367c390d28f5ea925482199c
5424 【后端】【1.4】跨服竞技场开发(排行榜封包)
4个文件已修改
556 ■■■■■ 已修改文件
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py 108 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py 170 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py 108 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py 170 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
@@ -3135,6 +3135,114 @@
#------------------------------------------------------
# C0 01 查看跨服竞技场赛季排行榜 #tagCGViewCrossPKBillboard
class  tagCGViewCrossPKBillboard(Structure):
    _pack_ = 1
    _fields_ = [
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ("ZoneID", c_ubyte),    # 赛区ID
                  ("SeasonID", c_ubyte),    # 赛季ID
                  ]
    def __init__(self):
        self.Clear()
        self.Cmd = 0xC0
        self.SubCmd = 0x01
        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 = 0xC0
        self.SubCmd = 0x01
        self.ZoneID = 0
        self.SeasonID = 0
        return
    def GetLength(self):
        return sizeof(tagCGViewCrossPKBillboard)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// C0 01 查看跨服竞技场赛季排行榜 //tagCGViewCrossPKBillboard:
                                Cmd:%s,
                                SubCmd:%s,
                                ZoneID:%d,
                                SeasonID:%d
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd,
                                self.ZoneID,
                                self.SeasonID
                                )
        return DumpString
m_NAtagCGViewCrossPKBillboard=tagCGViewCrossPKBillboard()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCGViewCrossPKBillboard.Cmd,m_NAtagCGViewCrossPKBillboard.SubCmd))] = m_NAtagCGViewCrossPKBillboard
#------------------------------------------------------
# C0 02 查看跨服玩家信息 #tagCGViewCrossPlayerInfo
class  tagCGViewCrossPlayerInfo(Structure):
    _pack_ = 1
    _fields_ = [
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ("PlayerID", c_int),    # 跨服玩家ID
                  ]
    def __init__(self):
        self.Clear()
        self.Cmd = 0xC0
        self.SubCmd = 0x02
        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 = 0xC0
        self.SubCmd = 0x02
        self.PlayerID = 0
        return
    def GetLength(self):
        return sizeof(tagCGViewCrossPlayerInfo)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// C0 02 查看跨服玩家信息 //tagCGViewCrossPlayerInfo:
                                Cmd:%s,
                                SubCmd:%s,
                                PlayerID:%d
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd,
                                self.PlayerID
                                )
        return DumpString
m_NAtagCGViewCrossPlayerInfo=tagCGViewCrossPlayerInfo()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCGViewCrossPlayerInfo.Cmd,m_NAtagCGViewCrossPlayerInfo.SubCmd))] = m_NAtagCGViewCrossPlayerInfo
#------------------------------------------------------
# A1 01 玩家电脑信息 #tagCMPCInfo
class  tagCMPCInfo(Structure):
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -8047,6 +8047,176 @@
#------------------------------------------------------
# C0 05 跨服PK赛季排行榜 #tagGCCrossRealmPKBillboardInfo
class  tagGCCrossRealmPKBillboardData(Structure):
    PlayerID = 0    #(DWORD PlayerID)
    NameLen = 0    #(BYTE NameLen)
    PlayerName = ""    #(String PlayerName)
    Job = 0    #(BYTE Job)
    FightPower = 0    #(DWORD FightPower)
    RealmLV = 0    #(WORD RealmLV)
    PKScore = 0    #(DWORD PKScore)
    DanLV = 0    #(BYTE DanLV)
    data = None
    def __init__(self):
        self.Clear()
        return
    def ReadData(self, _lpData, _pos=0, _Len=0):
        self.Clear()
        self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
        self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        self.PlayerName,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen)
        self.Job,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        self.FightPower,_pos = CommFunc.ReadDWORD(_lpData, _pos)
        self.RealmLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
        self.PKScore,_pos = CommFunc.ReadDWORD(_lpData, _pos)
        self.DanLV,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        return _pos
    def Clear(self):
        self.PlayerID = 0
        self.NameLen = 0
        self.PlayerName = ""
        self.Job = 0
        self.FightPower = 0
        self.RealmLV = 0
        self.PKScore = 0
        self.DanLV = 0
        return
    def GetLength(self):
        length = 0
        length += 4
        length += 1
        length += len(self.PlayerName)
        length += 1
        length += 4
        length += 2
        length += 4
        length += 1
        return length
    def GetBuffer(self):
        data = ''
        data = CommFunc.WriteDWORD(data, self.PlayerID)
        data = CommFunc.WriteBYTE(data, self.NameLen)
        data = CommFunc.WriteString(data, self.NameLen, self.PlayerName)
        data = CommFunc.WriteBYTE(data, self.Job)
        data = CommFunc.WriteDWORD(data, self.FightPower)
        data = CommFunc.WriteWORD(data, self.RealmLV)
        data = CommFunc.WriteDWORD(data, self.PKScore)
        data = CommFunc.WriteBYTE(data, self.DanLV)
        return data
    def OutputString(self):
        DumpString = '''
                                PlayerID:%d,
                                NameLen:%d,
                                PlayerName:%s,
                                Job:%d,
                                FightPower:%d,
                                RealmLV:%d,
                                PKScore:%d,
                                DanLV:%d
                                '''\
                                %(
                                self.PlayerID,
                                self.NameLen,
                                self.PlayerName,
                                self.Job,
                                self.FightPower,
                                self.RealmLV,
                                self.PKScore,
                                self.DanLV
                                )
        return DumpString
class  tagGCCrossRealmPKBillboardInfo(Structure):
    Head = tagHead()
    ZoneID = 0    #(BYTE ZoneID)// 赛区ID
    SeasonID = 0    #(BYTE SeasonID)// 赛季ID
    Count = 0    #(WORD Count)
    PKBillboardList = list()    #(vector<tagGCCrossRealmPKBillboardData> PKBillboardList)
    data = None
    def __init__(self):
        self.Clear()
        self.Head.Cmd = 0xC0
        self.Head.SubCmd = 0x05
        return
    def ReadData(self, _lpData, _pos=0, _Len=0):
        self.Clear()
        _pos = self.Head.ReadData(_lpData, _pos)
        self.ZoneID,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        self.SeasonID,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        self.Count,_pos = CommFunc.ReadWORD(_lpData, _pos)
        for i in range(self.Count):
            temPKBillboardList = tagGCCrossRealmPKBillboardData()
            _pos = temPKBillboardList.ReadData(_lpData, _pos)
            self.PKBillboardList.append(temPKBillboardList)
        return _pos
    def Clear(self):
        self.Head = tagHead()
        self.Head.Clear()
        self.Head.Cmd = 0xC0
        self.Head.SubCmd = 0x05
        self.ZoneID = 0
        self.SeasonID = 0
        self.Count = 0
        self.PKBillboardList = list()
        return
    def GetLength(self):
        length = 0
        length += self.Head.GetLength()
        length += 1
        length += 1
        length += 2
        for i in range(self.Count):
            length += self.PKBillboardList[i].GetLength()
        return length
    def GetBuffer(self):
        data = ''
        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
        data = CommFunc.WriteBYTE(data, self.ZoneID)
        data = CommFunc.WriteBYTE(data, self.SeasonID)
        data = CommFunc.WriteWORD(data, self.Count)
        for i in range(self.Count):
            data = CommFunc.WriteString(data, self.PKBillboardList[i].GetLength(), self.PKBillboardList[i].GetBuffer())
        return data
    def OutputString(self):
        DumpString = '''
                                Head:%s,
                                ZoneID:%d,
                                SeasonID:%d,
                                Count:%d,
                                PKBillboardList:%s
                                '''\
                                %(
                                self.Head.OutputString(),
                                self.ZoneID,
                                self.SeasonID,
                                self.Count,
                                "..."
                                )
        return DumpString
m_NAtagGCCrossRealmPKBillboardInfo=tagGCCrossRealmPKBillboardInfo()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCCrossRealmPKBillboardInfo.Head.Cmd,m_NAtagGCCrossRealmPKBillboardInfo.Head.SubCmd))] = m_NAtagGCCrossRealmPKBillboardInfo
#------------------------------------------------------
# C0 01 跨服PK匹配成功 #tagGCCrossRealmPKMatchOK
class  tagGCCrossRealmPKMatchPlayer(Structure):
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
@@ -3135,6 +3135,114 @@
#------------------------------------------------------
# C0 01 查看跨服竞技场赛季排行榜 #tagCGViewCrossPKBillboard
class  tagCGViewCrossPKBillboard(Structure):
    _pack_ = 1
    _fields_ = [
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ("ZoneID", c_ubyte),    # 赛区ID
                  ("SeasonID", c_ubyte),    # 赛季ID
                  ]
    def __init__(self):
        self.Clear()
        self.Cmd = 0xC0
        self.SubCmd = 0x01
        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 = 0xC0
        self.SubCmd = 0x01
        self.ZoneID = 0
        self.SeasonID = 0
        return
    def GetLength(self):
        return sizeof(tagCGViewCrossPKBillboard)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// C0 01 查看跨服竞技场赛季排行榜 //tagCGViewCrossPKBillboard:
                                Cmd:%s,
                                SubCmd:%s,
                                ZoneID:%d,
                                SeasonID:%d
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd,
                                self.ZoneID,
                                self.SeasonID
                                )
        return DumpString
m_NAtagCGViewCrossPKBillboard=tagCGViewCrossPKBillboard()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCGViewCrossPKBillboard.Cmd,m_NAtagCGViewCrossPKBillboard.SubCmd))] = m_NAtagCGViewCrossPKBillboard
#------------------------------------------------------
# C0 02 查看跨服玩家信息 #tagCGViewCrossPlayerInfo
class  tagCGViewCrossPlayerInfo(Structure):
    _pack_ = 1
    _fields_ = [
                  ("Cmd", c_ubyte),
                  ("SubCmd", c_ubyte),
                  ("PlayerID", c_int),    # 跨服玩家ID
                  ]
    def __init__(self):
        self.Clear()
        self.Cmd = 0xC0
        self.SubCmd = 0x02
        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 = 0xC0
        self.SubCmd = 0x02
        self.PlayerID = 0
        return
    def GetLength(self):
        return sizeof(tagCGViewCrossPlayerInfo)
    def GetBuffer(self):
        return string_at(addressof(self), self.GetLength())
    def OutputString(self):
        DumpString = '''// C0 02 查看跨服玩家信息 //tagCGViewCrossPlayerInfo:
                                Cmd:%s,
                                SubCmd:%s,
                                PlayerID:%d
                                '''\
                                %(
                                self.Cmd,
                                self.SubCmd,
                                self.PlayerID
                                )
        return DumpString
m_NAtagCGViewCrossPlayerInfo=tagCGViewCrossPlayerInfo()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCGViewCrossPlayerInfo.Cmd,m_NAtagCGViewCrossPlayerInfo.SubCmd))] = m_NAtagCGViewCrossPlayerInfo
#------------------------------------------------------
# A1 01 玩家电脑信息 #tagCMPCInfo
class  tagCMPCInfo(Structure):
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -8047,6 +8047,176 @@
#------------------------------------------------------
# C0 05 跨服PK赛季排行榜 #tagGCCrossRealmPKBillboardInfo
class  tagGCCrossRealmPKBillboardData(Structure):
    PlayerID = 0    #(DWORD PlayerID)
    NameLen = 0    #(BYTE NameLen)
    PlayerName = ""    #(String PlayerName)
    Job = 0    #(BYTE Job)
    FightPower = 0    #(DWORD FightPower)
    RealmLV = 0    #(WORD RealmLV)
    PKScore = 0    #(DWORD PKScore)
    DanLV = 0    #(BYTE DanLV)
    data = None
    def __init__(self):
        self.Clear()
        return
    def ReadData(self, _lpData, _pos=0, _Len=0):
        self.Clear()
        self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
        self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        self.PlayerName,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen)
        self.Job,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        self.FightPower,_pos = CommFunc.ReadDWORD(_lpData, _pos)
        self.RealmLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
        self.PKScore,_pos = CommFunc.ReadDWORD(_lpData, _pos)
        self.DanLV,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        return _pos
    def Clear(self):
        self.PlayerID = 0
        self.NameLen = 0
        self.PlayerName = ""
        self.Job = 0
        self.FightPower = 0
        self.RealmLV = 0
        self.PKScore = 0
        self.DanLV = 0
        return
    def GetLength(self):
        length = 0
        length += 4
        length += 1
        length += len(self.PlayerName)
        length += 1
        length += 4
        length += 2
        length += 4
        length += 1
        return length
    def GetBuffer(self):
        data = ''
        data = CommFunc.WriteDWORD(data, self.PlayerID)
        data = CommFunc.WriteBYTE(data, self.NameLen)
        data = CommFunc.WriteString(data, self.NameLen, self.PlayerName)
        data = CommFunc.WriteBYTE(data, self.Job)
        data = CommFunc.WriteDWORD(data, self.FightPower)
        data = CommFunc.WriteWORD(data, self.RealmLV)
        data = CommFunc.WriteDWORD(data, self.PKScore)
        data = CommFunc.WriteBYTE(data, self.DanLV)
        return data
    def OutputString(self):
        DumpString = '''
                                PlayerID:%d,
                                NameLen:%d,
                                PlayerName:%s,
                                Job:%d,
                                FightPower:%d,
                                RealmLV:%d,
                                PKScore:%d,
                                DanLV:%d
                                '''\
                                %(
                                self.PlayerID,
                                self.NameLen,
                                self.PlayerName,
                                self.Job,
                                self.FightPower,
                                self.RealmLV,
                                self.PKScore,
                                self.DanLV
                                )
        return DumpString
class  tagGCCrossRealmPKBillboardInfo(Structure):
    Head = tagHead()
    ZoneID = 0    #(BYTE ZoneID)// 赛区ID
    SeasonID = 0    #(BYTE SeasonID)// 赛季ID
    Count = 0    #(WORD Count)
    PKBillboardList = list()    #(vector<tagGCCrossRealmPKBillboardData> PKBillboardList)
    data = None
    def __init__(self):
        self.Clear()
        self.Head.Cmd = 0xC0
        self.Head.SubCmd = 0x05
        return
    def ReadData(self, _lpData, _pos=0, _Len=0):
        self.Clear()
        _pos = self.Head.ReadData(_lpData, _pos)
        self.ZoneID,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        self.SeasonID,_pos = CommFunc.ReadBYTE(_lpData, _pos)
        self.Count,_pos = CommFunc.ReadWORD(_lpData, _pos)
        for i in range(self.Count):
            temPKBillboardList = tagGCCrossRealmPKBillboardData()
            _pos = temPKBillboardList.ReadData(_lpData, _pos)
            self.PKBillboardList.append(temPKBillboardList)
        return _pos
    def Clear(self):
        self.Head = tagHead()
        self.Head.Clear()
        self.Head.Cmd = 0xC0
        self.Head.SubCmd = 0x05
        self.ZoneID = 0
        self.SeasonID = 0
        self.Count = 0
        self.PKBillboardList = list()
        return
    def GetLength(self):
        length = 0
        length += self.Head.GetLength()
        length += 1
        length += 1
        length += 2
        for i in range(self.Count):
            length += self.PKBillboardList[i].GetLength()
        return length
    def GetBuffer(self):
        data = ''
        data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
        data = CommFunc.WriteBYTE(data, self.ZoneID)
        data = CommFunc.WriteBYTE(data, self.SeasonID)
        data = CommFunc.WriteWORD(data, self.Count)
        for i in range(self.Count):
            data = CommFunc.WriteString(data, self.PKBillboardList[i].GetLength(), self.PKBillboardList[i].GetBuffer())
        return data
    def OutputString(self):
        DumpString = '''
                                Head:%s,
                                ZoneID:%d,
                                SeasonID:%d,
                                Count:%d,
                                PKBillboardList:%s
                                '''\
                                %(
                                self.Head.OutputString(),
                                self.ZoneID,
                                self.SeasonID,
                                self.Count,
                                "..."
                                )
        return DumpString
m_NAtagGCCrossRealmPKBillboardInfo=tagGCCrossRealmPKBillboardInfo()
ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCCrossRealmPKBillboardInfo.Head.Cmd,m_NAtagGCCrossRealmPKBillboardInfo.Head.SubCmd))] = m_NAtagGCCrossRealmPKBillboardInfo
#------------------------------------------------------
# C0 01 跨服PK匹配成功 #tagGCCrossRealmPKMatchOK
class  tagGCCrossRealmPKMatchPlayer(Structure):