From 23772c7a582ffd920706330d52b8603e9859ef4c Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期五, 07 十二月 2018 19:39:06 +0800
Subject: [PATCH] 4856 许愿池重置修改
---
ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py | 576 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 576 insertions(+), 0 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
index f35346d..acc64db 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py
@@ -24481,6 +24481,126 @@
#------------------------------------------------------
+# B2 08 获得仙缘币信息 #tagMCAddXianyuanCoinMsg
+
+class tagMCAddXianyuanCoinMsg(Structure):
+ Head = tagHead()
+ MapID = 0 #(DWORD MapID)
+ FuncLineID = 0 #(BYTE FuncLineID)
+ Relation = 0 #(BYTE Relation)// 当时的关系:0-无,1-好友,2-盟友
+ RelationCoinAdd = 0 #(BYTE RelationCoinAdd)// 社交关系总加成
+ XianyuanCoinAdd = 0 #(WORD XianyuanCoinAdd)// 实际增加的仙缘币
+ Reason = 0 #(BYTE Reason)//仙缘币为0时的原因:1-助战次数上限;2-每日获得上限
+ CallPlayerID = 0 #(DWORD CallPlayerID)// 助战的玩家ID,有值时代表真实助战,没有值时为自己打的
+ NameLen = 0 #(BYTE NameLen)
+ CallPlayerName = "" #(String CallPlayerName)// 助战的玩家名,size = NameLen
+ IsSweep = 0 #(BYTE IsSweep)// 是否扫荡
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xB2
+ self.Head.SubCmd = 0x08
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ _pos = self.Head.ReadData(_lpData, _pos)
+ self.MapID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.FuncLineID,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.Relation,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.RelationCoinAdd,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.XianyuanCoinAdd,_pos = CommFunc.ReadWORD(_lpData, _pos)
+ self.Reason,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.CallPlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.CallPlayerName,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen)
+ self.IsSweep,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xB2
+ self.Head.SubCmd = 0x08
+ self.MapID = 0
+ self.FuncLineID = 0
+ self.Relation = 0
+ self.RelationCoinAdd = 0
+ self.XianyuanCoinAdd = 0
+ self.Reason = 0
+ self.CallPlayerID = 0
+ self.NameLen = 0
+ self.CallPlayerName = ""
+ self.IsSweep = 0
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 4
+ length += 1
+ length += 1
+ length += 1
+ length += 2
+ length += 1
+ length += 4
+ length += 1
+ length += len(self.CallPlayerName)
+ length += 1
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+ data = CommFunc.WriteDWORD(data, self.MapID)
+ data = CommFunc.WriteBYTE(data, self.FuncLineID)
+ data = CommFunc.WriteBYTE(data, self.Relation)
+ data = CommFunc.WriteBYTE(data, self.RelationCoinAdd)
+ data = CommFunc.WriteWORD(data, self.XianyuanCoinAdd)
+ data = CommFunc.WriteBYTE(data, self.Reason)
+ data = CommFunc.WriteDWORD(data, self.CallPlayerID)
+ data = CommFunc.WriteBYTE(data, self.NameLen)
+ data = CommFunc.WriteString(data, self.NameLen, self.CallPlayerName)
+ data = CommFunc.WriteBYTE(data, self.IsSweep)
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ MapID:%d,
+ FuncLineID:%d,
+ Relation:%d,
+ RelationCoinAdd:%d,
+ XianyuanCoinAdd:%d,
+ Reason:%d,
+ CallPlayerID:%d,
+ NameLen:%d,
+ CallPlayerName:%s,
+ IsSweep:%d
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.MapID,
+ self.FuncLineID,
+ self.Relation,
+ self.RelationCoinAdd,
+ self.XianyuanCoinAdd,
+ self.Reason,
+ self.CallPlayerID,
+ self.NameLen,
+ self.CallPlayerName,
+ self.IsSweep
+ )
+ return DumpString
+
+
+m_NAtagMCAddXianyuanCoinMsg=tagMCAddXianyuanCoinMsg()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCAddXianyuanCoinMsg.Head.Cmd,m_NAtagMCAddXianyuanCoinMsg.Head.SubCmd))] = m_NAtagMCAddXianyuanCoinMsg
+
+
+#------------------------------------------------------
# B2 10 仙盟联赛玩家排名信息 #tagMCFamilyWarBillboard
class tagMCFamilyWarPlayer(Structure):
@@ -24829,6 +24949,462 @@
#------------------------------------------------------
+# B2 06 助战召唤结果 #tagMCHelpBattleCallResult
+
+class tagMCHelpBattleCallResult(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ("ObjID", c_int), # 助战实例ID
+ ("PlayerID", c_int), # 助战镜像ID,大于1小于100代表机器人,如果是机器人前端按顺序自己记录对应实例ID代表已召唤
+ ("Job", c_ubyte), # 职业
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xB2
+ self.SubCmd = 0x06
+ 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 = 0x06
+ self.ObjID = 0
+ self.PlayerID = 0
+ self.Job = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagMCHelpBattleCallResult)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// B2 06 助战召唤结果 //tagMCHelpBattleCallResult:
+ Cmd:%s,
+ SubCmd:%s,
+ ObjID:%d,
+ PlayerID:%d,
+ Job:%d
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd,
+ self.ObjID,
+ self.PlayerID,
+ self.Job
+ )
+ return DumpString
+
+
+m_NAtagMCHelpBattleCallResult=tagMCHelpBattleCallResult()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCHelpBattleCallResult.Cmd,m_NAtagMCHelpBattleCallResult.SubCmd))] = m_NAtagMCHelpBattleCallResult
+
+
+#------------------------------------------------------
+# B2 05 助战登记结果 #tagMCHelpBattleCheckInResult
+
+class tagMCHelpBattleCheckInResult(Structure):
+ _pack_ = 1
+ _fields_ = [
+ ("Cmd", c_ubyte),
+ ("SubCmd", c_ubyte),
+ ("IsOK", c_ubyte), #是否成功
+ ("IsLogin", c_ubyte), #是否登录同步已登记
+ ]
+
+ def __init__(self):
+ self.Clear()
+ self.Cmd = 0xB2
+ self.SubCmd = 0x05
+ 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 = 0x05
+ self.IsOK = 0
+ self.IsLogin = 0
+ return
+
+ def GetLength(self):
+ return sizeof(tagMCHelpBattleCheckInResult)
+
+ def GetBuffer(self):
+ return string_at(addressof(self), self.GetLength())
+
+ def OutputString(self):
+ DumpString = '''// B2 05 助战登记结果 //tagMCHelpBattleCheckInResult:
+ Cmd:%s,
+ SubCmd:%s,
+ IsOK:%d,
+ IsLogin:%d
+ '''\
+ %(
+ self.Cmd,
+ self.SubCmd,
+ self.IsOK,
+ self.IsLogin
+ )
+ return DumpString
+
+
+m_NAtagMCHelpBattleCheckInResult=tagMCHelpBattleCheckInResult()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCHelpBattleCheckInResult.Cmd,m_NAtagMCHelpBattleCheckInResult.SubCmd))] = m_NAtagMCHelpBattleCheckInResult
+
+
+#------------------------------------------------------
+# B2 07 助战机器人列表 #tagMCHelpBattleList
+
+class tagMCHelpBattlePlayer(Structure):
+ ObjID = 0 #(DWORD ObjID)// 实例ID, 0代表未召唤
+ PlayerID = 0 #(DWORD PlayerID)// 助战镜像ID, 大于1小于100代表机器人,如果是机器人,没有以下信息,相关信息自己读配置
+ NameLen = 0 #(BYTE NameLen)
+ Name = "" #(String Name)// 玩家名,size = NameLen
+ LV = 0 #(WORD LV)// 玩家等级
+ Job = 0 #(BYTE Job)// 玩家职业, 如果是机器人,则职业有值,服务端控制
+ RealmLV = 0 #(WORD RealmLV)// 玩家境界等级
+ FightPower = 0 #(DWORD FightPower)// 玩家战力
+ Relation = 0 #(BYTE Relation)// 关系:0-无,1-好友,2-盟友
+ IsNeedGold = 0 #(BYTE IsNeedGold)// 是否需要仙玉召唤
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ self.ObjID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.Name,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen)
+ self.LV,_pos = CommFunc.ReadWORD(_lpData, _pos)
+ self.Job,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.RealmLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
+ self.FightPower,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.Relation,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.IsNeedGold,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ return _pos
+
+ def Clear(self):
+ self.ObjID = 0
+ self.PlayerID = 0
+ self.NameLen = 0
+ self.Name = ""
+ self.LV = 0
+ self.Job = 0
+ self.RealmLV = 0
+ self.FightPower = 0
+ self.Relation = 0
+ self.IsNeedGold = 0
+ return
+
+ def GetLength(self):
+ length = 0
+ length += 4
+ length += 4
+ length += 1
+ length += len(self.Name)
+ length += 2
+ length += 1
+ length += 2
+ length += 4
+ length += 1
+ length += 1
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteDWORD(data, self.ObjID)
+ data = CommFunc.WriteDWORD(data, self.PlayerID)
+ data = CommFunc.WriteBYTE(data, self.NameLen)
+ data = CommFunc.WriteString(data, self.NameLen, self.Name)
+ data = CommFunc.WriteWORD(data, self.LV)
+ data = CommFunc.WriteBYTE(data, self.Job)
+ data = CommFunc.WriteWORD(data, self.RealmLV)
+ data = CommFunc.WriteDWORD(data, self.FightPower)
+ data = CommFunc.WriteBYTE(data, self.Relation)
+ data = CommFunc.WriteBYTE(data, self.IsNeedGold)
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ ObjID:%d,
+ PlayerID:%d,
+ NameLen:%d,
+ Name:%s,
+ LV:%d,
+ Job:%d,
+ RealmLV:%d,
+ FightPower:%d,
+ Relation:%d,
+ IsNeedGold:%d
+ '''\
+ %(
+ self.ObjID,
+ self.PlayerID,
+ self.NameLen,
+ self.Name,
+ self.LV,
+ self.Job,
+ self.RealmLV,
+ self.FightPower,
+ self.Relation,
+ self.IsNeedGold
+ )
+ return DumpString
+
+
+class tagMCHelpBattleList(Structure):
+ Head = tagHead()
+ RefreshCount = 0 #(BYTE RefreshCount)// 已刷新次数
+ HelpCount = 0 #(BYTE HelpCount)// 助战个数
+ HelpPlayerList = list() #(vector<tagMCHelpBattlePlayer> HelpPlayerList)// 助战镜像信息
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xB2
+ self.Head.SubCmd = 0x07
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ _pos = self.Head.ReadData(_lpData, _pos)
+ self.RefreshCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.HelpCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ for i in range(self.HelpCount):
+ temHelpPlayerList = tagMCHelpBattlePlayer()
+ _pos = temHelpPlayerList.ReadData(_lpData, _pos)
+ self.HelpPlayerList.append(temHelpPlayerList)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xB2
+ self.Head.SubCmd = 0x07
+ self.RefreshCount = 0
+ self.HelpCount = 0
+ self.HelpPlayerList = list()
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 1
+ length += 1
+ for i in range(self.HelpCount):
+ length += self.HelpPlayerList[i].GetLength()
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+ data = CommFunc.WriteBYTE(data, self.RefreshCount)
+ data = CommFunc.WriteBYTE(data, self.HelpCount)
+ for i in range(self.HelpCount):
+ data = CommFunc.WriteString(data, self.HelpPlayerList[i].GetLength(), self.HelpPlayerList[i].GetBuffer())
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ RefreshCount:%d,
+ HelpCount:%d,
+ HelpPlayerList:%s
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.RefreshCount,
+ self.HelpCount,
+ "..."
+ )
+ return DumpString
+
+
+m_NAtagMCHelpBattleList=tagMCHelpBattleList()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCHelpBattleList.Head.Cmd,m_NAtagMCHelpBattleList.Head.SubCmd))] = m_NAtagMCHelpBattleList
+
+
+#------------------------------------------------------
+# B2 11 助战记录列表 #tagMCHelpBattleRecordList
+
+class tagMCHelpBattleRecord(Structure):
+ CallPlayerID = 0 #(DWORD CallPlayerID)// 邀请助战的玩家ID
+ NameLen = 0 #(BYTE NameLen)
+ CallPlayerName = "" #(String CallPlayerName)// 邀请助战的玩家名,size = NameLen
+ MapID = 0 #(DWORD MapID)
+ FuncLineID = 0 #(BYTE FuncLineID)
+ XianyuanCoinAdd = 0 #(WORD XianyuanCoinAdd)// 增加的仙缘币,0代表已达上限
+ Relation = 0 #(BYTE Relation)// 当时的关系:0-无,1-好友,2-盟友
+ VIPLV = 0 #(BYTE VIPLV)// 当时的VIP等级
+ HelpTime = "" #(char HelpTime[19])// 助战时间yyyy-MM-dd hh:mm:ss
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ self.CallPlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.CallPlayerName,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen)
+ self.MapID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
+ self.FuncLineID,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.XianyuanCoinAdd,_pos = CommFunc.ReadWORD(_lpData, _pos)
+ self.Relation,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.VIPLV,_pos = CommFunc.ReadBYTE(_lpData, _pos)
+ self.HelpTime,_pos = CommFunc.ReadString(_lpData, _pos,19)
+ return _pos
+
+ def Clear(self):
+ self.CallPlayerID = 0
+ self.NameLen = 0
+ self.CallPlayerName = ""
+ self.MapID = 0
+ self.FuncLineID = 0
+ self.XianyuanCoinAdd = 0
+ self.Relation = 0
+ self.VIPLV = 0
+ self.HelpTime = ""
+ return
+
+ def GetLength(self):
+ length = 0
+ length += 4
+ length += 1
+ length += len(self.CallPlayerName)
+ length += 4
+ length += 1
+ length += 2
+ length += 1
+ length += 1
+ length += 19
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteDWORD(data, self.CallPlayerID)
+ data = CommFunc.WriteBYTE(data, self.NameLen)
+ data = CommFunc.WriteString(data, self.NameLen, self.CallPlayerName)
+ data = CommFunc.WriteDWORD(data, self.MapID)
+ data = CommFunc.WriteBYTE(data, self.FuncLineID)
+ data = CommFunc.WriteWORD(data, self.XianyuanCoinAdd)
+ data = CommFunc.WriteBYTE(data, self.Relation)
+ data = CommFunc.WriteBYTE(data, self.VIPLV)
+ data = CommFunc.WriteString(data, 19, self.HelpTime)
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ CallPlayerID:%d,
+ NameLen:%d,
+ CallPlayerName:%s,
+ MapID:%d,
+ FuncLineID:%d,
+ XianyuanCoinAdd:%d,
+ Relation:%d,
+ VIPLV:%d,
+ HelpTime:%s
+ '''\
+ %(
+ self.CallPlayerID,
+ self.NameLen,
+ self.CallPlayerName,
+ self.MapID,
+ self.FuncLineID,
+ self.XianyuanCoinAdd,
+ self.Relation,
+ self.VIPLV,
+ self.HelpTime
+ )
+ return DumpString
+
+
+class tagMCHelpBattleRecordList(Structure):
+ Head = tagHead()
+ RecordCount = 0 #(WORD RecordCount)// 记录数
+ RecordList = list() #(vector<tagMCHelpBattleRecord> RecordList)
+ data = None
+
+ def __init__(self):
+ self.Clear()
+ self.Head.Cmd = 0xB2
+ self.Head.SubCmd = 0x11
+ return
+
+ def ReadData(self, _lpData, _pos=0, _Len=0):
+ self.Clear()
+ _pos = self.Head.ReadData(_lpData, _pos)
+ self.RecordCount,_pos = CommFunc.ReadWORD(_lpData, _pos)
+ for i in range(self.RecordCount):
+ temRecordList = tagMCHelpBattleRecord()
+ _pos = temRecordList.ReadData(_lpData, _pos)
+ self.RecordList.append(temRecordList)
+ return _pos
+
+ def Clear(self):
+ self.Head = tagHead()
+ self.Head.Clear()
+ self.Head.Cmd = 0xB2
+ self.Head.SubCmd = 0x11
+ self.RecordCount = 0
+ self.RecordList = list()
+ return
+
+ def GetLength(self):
+ length = 0
+ length += self.Head.GetLength()
+ length += 2
+ for i in range(self.RecordCount):
+ length += self.RecordList[i].GetLength()
+
+ return length
+
+ def GetBuffer(self):
+ data = ''
+ data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
+ data = CommFunc.WriteWORD(data, self.RecordCount)
+ for i in range(self.RecordCount):
+ data = CommFunc.WriteString(data, self.RecordList[i].GetLength(), self.RecordList[i].GetBuffer())
+ return data
+
+ def OutputString(self):
+ DumpString = '''
+ Head:%s,
+ RecordCount:%d,
+ RecordList:%s
+ '''\
+ %(
+ self.Head.OutputString(),
+ self.RecordCount,
+ "..."
+ )
+ return DumpString
+
+
+m_NAtagMCHelpBattleRecordList=tagMCHelpBattleRecordList()
+ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCHelpBattleRecordList.Head.Cmd,m_NAtagMCHelpBattleRecordList.Head.SubCmd))] = m_NAtagMCHelpBattleRecordList
+
+
+#------------------------------------------------------
# B2 04 冰晶矿脉信息通知 #tagMCIceLodeInfo
class tagMCIceLodeInfo(Structure):
--
Gitblit v1.8.0