From 19e0109ec1e936204cb85362d2e3f705b8b9554c Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 03 十二月 2020 11:19:38 +0800
Subject: [PATCH] 8585 【主干】【BT】【长尾】【后端】竞技场(封包)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py | 156 ++++++++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py | 383 +++++++++++++++++++++
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py | 156 ++++++++
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py | 383 +++++++++++++++++++++
4 files changed, 1,078 insertions(+), 0 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
index 8beef4d..c76019e 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py
@@ -1304,6 +1304,54 @@
#------------------------------------------------------
+# A9 A8 查看竞技场对战记录 #tagCGQueryArenaBattleRecord
+
+class tagCGQueryArenaBattleRecord(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xA9
+ self.SubCmd = 0xA8
+ 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 = 0xA8
+ return
+
+ def GetLength(self):
+ return sizeof(tagCGQueryArenaBattleRecord)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// A9 A8 查看竞技场对战记录 //tagCGQueryArenaBattleRecord:
+ Cmd:%s,
+ SubCmd:%s
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd
+ )
+ return DumpString
+
+
+m_NAtagCGQueryArenaBattleRecord=tagCGQueryArenaBattleRecord()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCGQueryArenaBattleRecord.Cmd,m_NAtagCGQueryArenaBattleRecord.SubCmd))] = m_NAtagCGQueryArenaBattleRecord
+
+
+#------------------------------------------------------
# A9 04 查询boss信息 #tagCGQueryBossInfo
class tagCGQueryBossInfo(Structure):
@@ -15119,6 +15167,114 @@
#------------------------------------------------------
+# B2 10 竞技场挑战玩家 #tagCMArenaBattle
+
+class tagCMArenaBattle(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ("TagPlayerID", c_int), # 目标玩家ID或机器人ID
+ ("Result", c_ubyte), # 0-进入自定义场景发送通知后端;1-胜利(后端处理,暂时不需要发送此状态);2-失败(前端被对手击杀需要发送此状态)
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xB2
+ self.SubCmd = 0x10
+ 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 = 0xB2
+ self.SubCmd = 0x10
+ self.TagPlayerID = 0
+ self.Result = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagCMArenaBattle)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// B2 10 竞技场挑战玩家 //tagCMArenaBattle:
+ Cmd:%s,
+ SubCmd:%s,
+ TagPlayerID:%d,
+ Result:%d
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd,
+ self.TagPlayerID,
+ self.Result
+ )
+ return DumpString
+
+
+m_NAtagCMArenaBattle=tagCMArenaBattle()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMArenaBattle.Cmd,m_NAtagCMArenaBattle.SubCmd))] = m_NAtagCMArenaBattle
+
+
+#------------------------------------------------------
+# B2 09 竞技场匹配玩家 #tagCMArenaMatch
+
+class tagCMArenaMatch(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ("IsRefresh", c_ubyte), # 0-打开界面无匹配数据时时查询,1-强制刷新匹配列表
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xB2
+ self.SubCmd = 0x09
+ 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 = 0xB2
+ self.SubCmd = 0x09
+ self.IsRefresh = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagCMArenaMatch)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// B2 09 竞技场匹配玩家 //tagCMArenaMatch:
+ Cmd:%s,
+ SubCmd:%s,
+ IsRefresh:%d
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd,
+ self.IsRefresh
+ )
+ return DumpString
+
+
+m_NAtagCMArenaMatch=tagCMArenaMatch()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMArenaMatch.Cmd,m_NAtagCMArenaMatch.SubCmd))] = m_NAtagCMArenaMatch
+
+
+#------------------------------------------------------
# B2 07 重置加点 #tagCMResetAttrPoint
class tagCMResetAttrPoint(Structure):
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
index 7be48bd..4b0337e 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -2329,6 +2329,325 @@
#------------------------------------------------------
+# A9 23 竞技场对战记录列表 #tagGCArenaBattleRecordList
+
+class tagGCArenaBattleRecord(Structure):
+ PlayerID = 0 #(DWORD PlayerID)//目标玩家ID,小于10000为机器人ID
+ PlayerName = "" #(char PlayerName[33])
+ Job = 0 #(BYTE Job)
+ LV = 0 #(WORD LV)//等级
+ RealmLV = 0 #(WORD RealmLV)//境界,机器人读境界表取等级对应境界
+ FightPower = 0 #(DWORD FightPower)//战力,机器人读等级表取等级对应战力
+ AddScoreLen = 0 #(BYTE AddScoreLen)
+ AddScore = "" #(String AddScore)//本次对战增加的积分,有正负
+ IsWin = 0 #(BYTE IsWin)//是否获胜
+ Time = 0 #(DWORD Time)//时间戳
+ 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.PlayerName,_pos = CommFunc.ReadString(_lpData, _pos,33)
+ self.Job,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.LV,_pos = CommFunc.ReadWORD(_lpData, _pos)
+ self.RealmLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
+ self.FightPower,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.AddScoreLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.AddScore,_pos = CommFunc.ReadString(_lpData, _pos,self.AddScoreLen)
+ self.IsWin,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.Time,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ return _pos
+
+ def Clear(self):
+ self.PlayerID = 0
+ self.PlayerName = ""
+ self.Job = 0
+ self.LV = 0
+ self.RealmLV = 0
+ self.FightPower = 0
+ self.AddScoreLen = 0
+ self.AddScore = ""
+ self.IsWin = 0
+ self.Time = 0
+ return
+
+ def GetLength(self):
+ length = 0
+ length += 4
+ length += 33
+ length += 1
+ length += 2
+ length += 2
+ length += 4
+ length += 1
+ length += len(self.AddScore)
+ length += 1
+ length += 4
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteDWORD(data, self.PlayerID)
+ data = CommFunc.WriteString(data, 33, self.PlayerName)
+ data = CommFunc.WriteBYTE(data, self.Job)
+ data = CommFunc.WriteWORD(data, self.LV)
+ data = CommFunc.WriteWORD(data, self.RealmLV)
+ data = CommFunc.WriteDWORD(data, self.FightPower)
+ data = CommFunc.WriteBYTE(data, self.AddScoreLen)
+ data = CommFunc.WriteString(data, self.AddScoreLen, self.AddScore)
+ data = CommFunc.WriteBYTE(data, self.IsWin)
+ data = CommFunc.WriteDWORD(data, self.Time)
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ PlayerID:%d,
+ PlayerName:%s,
+ Job:%d,
+ LV:%d,
+ RealmLV:%d,
+ FightPower:%d,
+ AddScoreLen:%d,
+ AddScore:%s,
+ IsWin:%d,
+ Time:%d
+ '''\
+ %(
+ self.PlayerID,
+ self.PlayerName,
+ self.Job,
+ self.LV,
+ self.RealmLV,
+ self.FightPower,
+ self.AddScoreLen,
+ self.AddScore,
+ self.IsWin,
+ self.Time
+ )
+ return DumpString
+
+
+class tagGCArenaBattleRecordList(Structure):
+ Head = tagHead()
+ RecordCount = 0 #(BYTE RecordCount)
+ BattleRecordList = list() #(vector<tagGCArenaBattleRecord> BattleRecordList)// 对战列表
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xA9
+ self.Head.SubCmd = 0x23
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ _pos = self.Head.ReadData(_lpData, _pos)
+ self.RecordCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.RecordCount):
+ temBattleRecordList = tagGCArenaBattleRecord()
+ _pos = temBattleRecordList.ReadData(_lpData, _pos)
+ self.BattleRecordList.append(temBattleRecordList)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xA9
+ self.Head.SubCmd = 0x23
+ self.RecordCount = 0
+ self.BattleRecordList = list()
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 1
+ for i in range(self.RecordCount):
+ length += self.BattleRecordList[i].GetLength()
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+ data = CommFunc.WriteBYTE(data, self.RecordCount)
+ for i in range(self.RecordCount):
+ data = CommFunc.WriteString(data, self.BattleRecordList[i].GetLength(), self.BattleRecordList[i].GetBuffer())
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ RecordCount:%d,
+ BattleRecordList:%s
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.RecordCount,
+ "..."
+ )
+ return DumpString
+
+
+m_NAtagGCArenaBattleRecordList=tagGCArenaBattleRecordList()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCArenaBattleRecordList.Head.Cmd,m_NAtagGCArenaBattleRecordList.Head.SubCmd))] = m_NAtagGCArenaBattleRecordList
+
+
+#------------------------------------------------------
+# A9 22 竞技场匹配玩家列表 #tagGCArenaMatchList
+
+class tagGCArenaMatchInfo(Structure):
+ PlayerID = 0 #(DWORD PlayerID)//目标玩家ID,小于10000为机器人ID
+ PlayerName = "" #(char PlayerName[33])
+ Job = 0 #(BYTE Job)
+ LV = 0 #(WORD LV)//等级
+ RealmLV = 0 #(WORD RealmLV)//境界,机器人读境界表取等级对应境界
+ FightPower = 0 #(DWORD FightPower)//战力,机器人读等级表取等级对应战力
+ Score = 0 #(DWORD Score)//积分
+ 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.PlayerName,_pos = CommFunc.ReadString(_lpData, _pos,33)
+ self.Job,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.LV,_pos = CommFunc.ReadWORD(_lpData, _pos)
+ self.RealmLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
+ self.FightPower,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.Score,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ return _pos
+
+ def Clear(self):
+ self.PlayerID = 0
+ self.PlayerName = ""
+ self.Job = 0
+ self.LV = 0
+ self.RealmLV = 0
+ self.FightPower = 0
+ self.Score = 0
+ return
+
+ def GetLength(self):
+ length = 0
+ length += 4
+ length += 33
+ length += 1
+ length += 2
+ length += 2
+ length += 4
+ length += 4
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteDWORD(data, self.PlayerID)
+ data = CommFunc.WriteString(data, 33, self.PlayerName)
+ data = CommFunc.WriteBYTE(data, self.Job)
+ data = CommFunc.WriteWORD(data, self.LV)
+ data = CommFunc.WriteWORD(data, self.RealmLV)
+ data = CommFunc.WriteDWORD(data, self.FightPower)
+ data = CommFunc.WriteDWORD(data, self.Score)
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ PlayerID:%d,
+ PlayerName:%s,
+ Job:%d,
+ LV:%d,
+ RealmLV:%d,
+ FightPower:%d,
+ Score:%d
+ '''\
+ %(
+ self.PlayerID,
+ self.PlayerName,
+ self.Job,
+ self.LV,
+ self.RealmLV,
+ self.FightPower,
+ self.Score
+ )
+ return DumpString
+
+
+class tagGCArenaMatchList(Structure):
+ Head = tagHead()
+ MatchCount = 0 #(BYTE MatchCount)
+ MatchList = list() #(vector<tagGCArenaMatchInfo> MatchList)// 匹配列表
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xA9
+ self.Head.SubCmd = 0x22
+ 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 = tagGCArenaMatchInfo()
+ _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 = 0x22
+ 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_NAtagGCArenaMatchList=tagGCArenaMatchList()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCArenaMatchList.Head.Cmd,m_NAtagGCArenaMatchList.Head.SubCmd))] = m_NAtagGCArenaMatchList
+
+
+#------------------------------------------------------
# A9 09 通知BOSS关注记录 #tagGCBossAttentionInfo
class tagGCBossAttention(Structure):
@@ -13553,6 +13872,70 @@
#------------------------------------------------------
+# A3 C3 竞技场玩家信息 #tagMCArenaPlayerInfo
+
+class tagMCArenaPlayerInfo(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ("Score", c_int), #当前积分
+ ("BattleCountToday", c_ubyte), #今日已挑战次数
+ ("MatchRefreshCount", c_ubyte), #当前已刷新匹配列表次数,每次挑战后会重置
+ ("ItemAddBattleCountToday", c_ubyte), #今日已使用物品增加的挑战次数
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xA3
+ self.SubCmd = 0xC3
+ 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 = 0xA3
+ self.SubCmd = 0xC3
+ self.Score = 0
+ self.BattleCountToday = 0
+ self.MatchRefreshCount = 0
+ self.ItemAddBattleCountToday = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagMCArenaPlayerInfo)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// A3 C3 竞技场玩家信息 //tagMCArenaPlayerInfo:
+ Cmd:%s,
+ SubCmd:%s,
+ Score:%d,
+ BattleCountToday:%d,
+ MatchRefreshCount:%d,
+ ItemAddBattleCountToday:%d
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd,
+ self.Score,
+ self.BattleCountToday,
+ self.MatchRefreshCount,
+ self.ItemAddBattleCountToday
+ )
+ return DumpString
+
+
+m_NAtagMCArenaPlayerInfo=tagMCArenaPlayerInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCArenaPlayerInfo.Cmd,m_NAtagMCArenaPlayerInfo.SubCmd))] = m_NAtagMCArenaPlayerInfo
+
+
+#------------------------------------------------------
# A3 0F 通知玩家悬赏任务信息 #tagMCArrestTaskInfo
class tagMCArrestTaskInfo(Structure):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
index 8beef4d..c76019e 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py
@@ -1304,6 +1304,54 @@
#------------------------------------------------------
+# A9 A8 查看竞技场对战记录 #tagCGQueryArenaBattleRecord
+
+class tagCGQueryArenaBattleRecord(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xA9
+ self.SubCmd = 0xA8
+ 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 = 0xA8
+ return
+
+ def GetLength(self):
+ return sizeof(tagCGQueryArenaBattleRecord)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// A9 A8 查看竞技场对战记录 //tagCGQueryArenaBattleRecord:
+ Cmd:%s,
+ SubCmd:%s
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd
+ )
+ return DumpString
+
+
+m_NAtagCGQueryArenaBattleRecord=tagCGQueryArenaBattleRecord()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCGQueryArenaBattleRecord.Cmd,m_NAtagCGQueryArenaBattleRecord.SubCmd))] = m_NAtagCGQueryArenaBattleRecord
+
+
+#------------------------------------------------------
# A9 04 查询boss信息 #tagCGQueryBossInfo
class tagCGQueryBossInfo(Structure):
@@ -15119,6 +15167,114 @@
#------------------------------------------------------
+# B2 10 竞技场挑战玩家 #tagCMArenaBattle
+
+class tagCMArenaBattle(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ("TagPlayerID", c_int), # 目标玩家ID或机器人ID
+ ("Result", c_ubyte), # 0-进入自定义场景发送通知后端;1-胜利(后端处理,暂时不需要发送此状态);2-失败(前端被对手击杀需要发送此状态)
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xB2
+ self.SubCmd = 0x10
+ 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 = 0xB2
+ self.SubCmd = 0x10
+ self.TagPlayerID = 0
+ self.Result = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagCMArenaBattle)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// B2 10 竞技场挑战玩家 //tagCMArenaBattle:
+ Cmd:%s,
+ SubCmd:%s,
+ TagPlayerID:%d,
+ Result:%d
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd,
+ self.TagPlayerID,
+ self.Result
+ )
+ return DumpString
+
+
+m_NAtagCMArenaBattle=tagCMArenaBattle()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMArenaBattle.Cmd,m_NAtagCMArenaBattle.SubCmd))] = m_NAtagCMArenaBattle
+
+
+#------------------------------------------------------
+# B2 09 竞技场匹配玩家 #tagCMArenaMatch
+
+class tagCMArenaMatch(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ("IsRefresh", c_ubyte), # 0-打开界面无匹配数据时时查询,1-强制刷新匹配列表
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xB2
+ self.SubCmd = 0x09
+ 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 = 0xB2
+ self.SubCmd = 0x09
+ self.IsRefresh = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagCMArenaMatch)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// B2 09 竞技场匹配玩家 //tagCMArenaMatch:
+ Cmd:%s,
+ SubCmd:%s,
+ IsRefresh:%d
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd,
+ self.IsRefresh
+ )
+ return DumpString
+
+
+m_NAtagCMArenaMatch=tagCMArenaMatch()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMArenaMatch.Cmd,m_NAtagCMArenaMatch.SubCmd))] = m_NAtagCMArenaMatch
+
+
+#------------------------------------------------------
# B2 07 重置加点 #tagCMResetAttrPoint
class tagCMResetAttrPoint(Structure):
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
index 7be48bd..4b0337e 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py
@@ -2329,6 +2329,325 @@
#------------------------------------------------------
+# A9 23 竞技场对战记录列表 #tagGCArenaBattleRecordList
+
+class tagGCArenaBattleRecord(Structure):
+ PlayerID = 0 #(DWORD PlayerID)//目标玩家ID,小于10000为机器人ID
+ PlayerName = "" #(char PlayerName[33])
+ Job = 0 #(BYTE Job)
+ LV = 0 #(WORD LV)//等级
+ RealmLV = 0 #(WORD RealmLV)//境界,机器人读境界表取等级对应境界
+ FightPower = 0 #(DWORD FightPower)//战力,机器人读等级表取等级对应战力
+ AddScoreLen = 0 #(BYTE AddScoreLen)
+ AddScore = "" #(String AddScore)//本次对战增加的积分,有正负
+ IsWin = 0 #(BYTE IsWin)//是否获胜
+ Time = 0 #(DWORD Time)//时间戳
+ 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.PlayerName,_pos = CommFunc.ReadString(_lpData, _pos,33)
+ self.Job,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.LV,_pos = CommFunc.ReadWORD(_lpData, _pos)
+ self.RealmLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
+ self.FightPower,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.AddScoreLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.AddScore,_pos = CommFunc.ReadString(_lpData, _pos,self.AddScoreLen)
+ self.IsWin,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.Time,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ return _pos
+
+ def Clear(self):
+ self.PlayerID = 0
+ self.PlayerName = ""
+ self.Job = 0
+ self.LV = 0
+ self.RealmLV = 0
+ self.FightPower = 0
+ self.AddScoreLen = 0
+ self.AddScore = ""
+ self.IsWin = 0
+ self.Time = 0
+ return
+
+ def GetLength(self):
+ length = 0
+ length += 4
+ length += 33
+ length += 1
+ length += 2
+ length += 2
+ length += 4
+ length += 1
+ length += len(self.AddScore)
+ length += 1
+ length += 4
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteDWORD(data, self.PlayerID)
+ data = CommFunc.WriteString(data, 33, self.PlayerName)
+ data = CommFunc.WriteBYTE(data, self.Job)
+ data = CommFunc.WriteWORD(data, self.LV)
+ data = CommFunc.WriteWORD(data, self.RealmLV)
+ data = CommFunc.WriteDWORD(data, self.FightPower)
+ data = CommFunc.WriteBYTE(data, self.AddScoreLen)
+ data = CommFunc.WriteString(data, self.AddScoreLen, self.AddScore)
+ data = CommFunc.WriteBYTE(data, self.IsWin)
+ data = CommFunc.WriteDWORD(data, self.Time)
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ PlayerID:%d,
+ PlayerName:%s,
+ Job:%d,
+ LV:%d,
+ RealmLV:%d,
+ FightPower:%d,
+ AddScoreLen:%d,
+ AddScore:%s,
+ IsWin:%d,
+ Time:%d
+ '''\
+ %(
+ self.PlayerID,
+ self.PlayerName,
+ self.Job,
+ self.LV,
+ self.RealmLV,
+ self.FightPower,
+ self.AddScoreLen,
+ self.AddScore,
+ self.IsWin,
+ self.Time
+ )
+ return DumpString
+
+
+class tagGCArenaBattleRecordList(Structure):
+ Head = tagHead()
+ RecordCount = 0 #(BYTE RecordCount)
+ BattleRecordList = list() #(vector<tagGCArenaBattleRecord> BattleRecordList)// 对战列表
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xA9
+ self.Head.SubCmd = 0x23
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ _pos = self.Head.ReadData(_lpData, _pos)
+ self.RecordCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.RecordCount):
+ temBattleRecordList = tagGCArenaBattleRecord()
+ _pos = temBattleRecordList.ReadData(_lpData, _pos)
+ self.BattleRecordList.append(temBattleRecordList)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xA9
+ self.Head.SubCmd = 0x23
+ self.RecordCount = 0
+ self.BattleRecordList = list()
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 1
+ for i in range(self.RecordCount):
+ length += self.BattleRecordList[i].GetLength()
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+ data = CommFunc.WriteBYTE(data, self.RecordCount)
+ for i in range(self.RecordCount):
+ data = CommFunc.WriteString(data, self.BattleRecordList[i].GetLength(), self.BattleRecordList[i].GetBuffer())
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ RecordCount:%d,
+ BattleRecordList:%s
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.RecordCount,
+ "..."
+ )
+ return DumpString
+
+
+m_NAtagGCArenaBattleRecordList=tagGCArenaBattleRecordList()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCArenaBattleRecordList.Head.Cmd,m_NAtagGCArenaBattleRecordList.Head.SubCmd))] = m_NAtagGCArenaBattleRecordList
+
+
+#------------------------------------------------------
+# A9 22 竞技场匹配玩家列表 #tagGCArenaMatchList
+
+class tagGCArenaMatchInfo(Structure):
+ PlayerID = 0 #(DWORD PlayerID)//目标玩家ID,小于10000为机器人ID
+ PlayerName = "" #(char PlayerName[33])
+ Job = 0 #(BYTE Job)
+ LV = 0 #(WORD LV)//等级
+ RealmLV = 0 #(WORD RealmLV)//境界,机器人读境界表取等级对应境界
+ FightPower = 0 #(DWORD FightPower)//战力,机器人读等级表取等级对应战力
+ Score = 0 #(DWORD Score)//积分
+ 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.PlayerName,_pos = CommFunc.ReadString(_lpData, _pos,33)
+ self.Job,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.LV,_pos = CommFunc.ReadWORD(_lpData, _pos)
+ self.RealmLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
+ self.FightPower,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.Score,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ return _pos
+
+ def Clear(self):
+ self.PlayerID = 0
+ self.PlayerName = ""
+ self.Job = 0
+ self.LV = 0
+ self.RealmLV = 0
+ self.FightPower = 0
+ self.Score = 0
+ return
+
+ def GetLength(self):
+ length = 0
+ length += 4
+ length += 33
+ length += 1
+ length += 2
+ length += 2
+ length += 4
+ length += 4
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteDWORD(data, self.PlayerID)
+ data = CommFunc.WriteString(data, 33, self.PlayerName)
+ data = CommFunc.WriteBYTE(data, self.Job)
+ data = CommFunc.WriteWORD(data, self.LV)
+ data = CommFunc.WriteWORD(data, self.RealmLV)
+ data = CommFunc.WriteDWORD(data, self.FightPower)
+ data = CommFunc.WriteDWORD(data, self.Score)
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ PlayerID:%d,
+ PlayerName:%s,
+ Job:%d,
+ LV:%d,
+ RealmLV:%d,
+ FightPower:%d,
+ Score:%d
+ '''\
+ %(
+ self.PlayerID,
+ self.PlayerName,
+ self.Job,
+ self.LV,
+ self.RealmLV,
+ self.FightPower,
+ self.Score
+ )
+ return DumpString
+
+
+class tagGCArenaMatchList(Structure):
+ Head = tagHead()
+ MatchCount = 0 #(BYTE MatchCount)
+ MatchList = list() #(vector<tagGCArenaMatchInfo> MatchList)// 匹配列表
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xA9
+ self.Head.SubCmd = 0x22
+ 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 = tagGCArenaMatchInfo()
+ _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 = 0x22
+ 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_NAtagGCArenaMatchList=tagGCArenaMatchList()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCArenaMatchList.Head.Cmd,m_NAtagGCArenaMatchList.Head.SubCmd))] = m_NAtagGCArenaMatchList
+
+
+#------------------------------------------------------
# A9 09 通知BOSS关注记录 #tagGCBossAttentionInfo
class tagGCBossAttention(Structure):
@@ -13553,6 +13872,70 @@
#------------------------------------------------------
+# A3 C3 竞技场玩家信息 #tagMCArenaPlayerInfo
+
+class tagMCArenaPlayerInfo(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ("Score", c_int), #当前积分
+ ("BattleCountToday", c_ubyte), #今日已挑战次数
+ ("MatchRefreshCount", c_ubyte), #当前已刷新匹配列表次数,每次挑战后会重置
+ ("ItemAddBattleCountToday", c_ubyte), #今日已使用物品增加的挑战次数
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xA3
+ self.SubCmd = 0xC3
+ 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 = 0xA3
+ self.SubCmd = 0xC3
+ self.Score = 0
+ self.BattleCountToday = 0
+ self.MatchRefreshCount = 0
+ self.ItemAddBattleCountToday = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagMCArenaPlayerInfo)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// A3 C3 竞技场玩家信息 //tagMCArenaPlayerInfo:
+ Cmd:%s,
+ SubCmd:%s,
+ Score:%d,
+ BattleCountToday:%d,
+ MatchRefreshCount:%d,
+ ItemAddBattleCountToday:%d
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd,
+ self.Score,
+ self.BattleCountToday,
+ self.MatchRefreshCount,
+ self.ItemAddBattleCountToday
+ )
+ return DumpString
+
+
+m_NAtagMCArenaPlayerInfo=tagMCArenaPlayerInfo()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCArenaPlayerInfo.Cmd,m_NAtagMCArenaPlayerInfo.SubCmd))] = m_NAtagMCArenaPlayerInfo
+
+
+#------------------------------------------------------
# A3 0F 通知玩家悬赏任务信息 #tagMCArrestTaskInfo
class tagMCArrestTaskInfo(Structure):
--
Gitblit v1.8.0