From ac4f3139e69d4671a46a299df51159f018a5da13 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期二, 26 十一月 2019 11:35:00 +0800 Subject: [PATCH] 8346 【恺英】【后端】协助系统(封包、表) --- ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py | 340 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 340 insertions(+), 0 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py index 1dd0089..c744f36 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py @@ -1960,6 +1960,120 @@ #------------------------------------------------------ +# B0 13 取消协助Boss #tagCGCancelAssistBoss + +class tagCGCancelAssistBoss(Structure): + Head = tagHead() + GUID = "" #(char GUID[40]) + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB0 + self.Head.SubCmd = 0x13 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.GUID,_pos = CommFunc.ReadString(_lpData, _pos,40) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB0 + self.Head.SubCmd = 0x13 + self.GUID = "" + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 40 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteString(data, 40, self.GUID) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + GUID:%s + '''\ + %( + self.Head.OutputString(), + self.GUID + ) + return DumpString + + +m_NAtagCGCancelAssistBoss=tagCGCancelAssistBoss() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCGCancelAssistBoss.Head.Cmd,m_NAtagCGCancelAssistBoss.Head.SubCmd))] = m_NAtagCGCancelAssistBoss + + +#------------------------------------------------------ +# B0 15 领取协助感谢礼物 #tagCGGetAssistGift + +class tagCGGetAssistGift(Structure): + Head = tagHead() + GUID = "" #(char GUID[40]) + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB0 + self.Head.SubCmd = 0x15 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.GUID,_pos = CommFunc.ReadString(_lpData, _pos,40) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB0 + self.Head.SubCmd = 0x15 + self.GUID = "" + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 40 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteString(data, 40, self.GUID) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + GUID:%s + '''\ + %( + self.Head.OutputString(), + self.GUID + ) + return DumpString + + +m_NAtagCGGetAssistGift=tagCGGetAssistGift() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCGGetAssistGift.Head.Cmd,m_NAtagCGGetAssistGift.Head.SubCmd))] = m_NAtagCGGetAssistGift + + +#------------------------------------------------------ #B0 25 请求家族悬赏任务完成情况 #tagQueryFamilyArrestOverState class tagQueryFamilyArrestOverState(Structure): @@ -2005,6 +2119,120 @@ m_NAtagQueryFamilyArrestOverState=tagQueryFamilyArrestOverState() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagQueryFamilyArrestOverState.Cmd,m_NAtagQueryFamilyArrestOverState.SubCmd))] = m_NAtagQueryFamilyArrestOverState + + +#------------------------------------------------------ +# B0 14 发送协助感谢礼物 #tagCGSendAssistGift + +class tagCGSendAssistGift(Structure): + Head = tagHead() + GUID = "" #(char GUID[40]) + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB0 + self.Head.SubCmd = 0x14 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.GUID,_pos = CommFunc.ReadString(_lpData, _pos,40) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB0 + self.Head.SubCmd = 0x14 + self.GUID = "" + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 40 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteString(data, 40, self.GUID) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + GUID:%s + '''\ + %( + self.Head.OutputString(), + self.GUID + ) + return DumpString + + +m_NAtagCGSendAssistGift=tagCGSendAssistGift() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCGSendAssistGift.Head.Cmd,m_NAtagCGSendAssistGift.Head.SubCmd))] = m_NAtagCGSendAssistGift + + +#------------------------------------------------------ +# B0 12 开始协助Boss #tagCGStartAssistBoss + +class tagCGStartAssistBoss(Structure): + Head = tagHead() + GUID = "" #(char GUID[40]) + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB0 + self.Head.SubCmd = 0x12 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.GUID,_pos = CommFunc.ReadString(_lpData, _pos,40) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB0 + self.Head.SubCmd = 0x12 + self.GUID = "" + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 40 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteString(data, 40, self.GUID) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + GUID:%s + '''\ + %( + self.Head.OutputString(), + self.GUID + ) + return DumpString + + +m_NAtagCGStartAssistBoss=tagCGStartAssistBoss() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCGStartAssistBoss.Head.Cmd,m_NAtagCGStartAssistBoss.Head.SubCmd))] = m_NAtagCGStartAssistBoss #------------------------------------------------------ @@ -13940,6 +14168,118 @@ #------------------------------------------------------ +# B0 10 请求协助Boss #tagCMRequestAssistBoss + +class tagCMRequestAssistBoss(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("ObjID", c_int), + ("NPCID", c_int), + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xB0 + 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 = 0xB0 + self.SubCmd = 0x10 + self.ObjID = 0 + self.NPCID = 0 + return + + def GetLength(self): + return sizeof(tagCMRequestAssistBoss) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B0 10 请求协助Boss //tagCMRequestAssistBoss: + Cmd:%s, + SubCmd:%s, + ObjID:%d, + NPCID:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.ObjID, + self.NPCID + ) + return DumpString + + +m_NAtagCMRequestAssistBoss=tagCMRequestAssistBoss() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMRequestAssistBoss.Cmd,m_NAtagCMRequestAssistBoss.SubCmd))] = m_NAtagCMRequestAssistBoss + + +#------------------------------------------------------ +# B0 11 请求协助组队副本 #tagCMRequestAssistTeamFB + +class tagCMRequestAssistTeamFB(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("MapID", c_ushort), + ("LineID", c_ushort), + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xB0 + self.SubCmd = 0x11 + 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 = 0xB0 + self.SubCmd = 0x11 + self.MapID = 0 + self.LineID = 0 + return + + def GetLength(self): + return sizeof(tagCMRequestAssistTeamFB) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B0 11 请求协助组队副本 //tagCMRequestAssistTeamFB: + Cmd:%s, + SubCmd:%s, + MapID:%d, + LineID:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.MapID, + self.LineID + ) + return DumpString + + +m_NAtagCMRequestAssistTeamFB=tagCMRequestAssistTeamFB() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMRequestAssistTeamFB.Cmd,m_NAtagCMRequestAssistTeamFB.SubCmd))] = m_NAtagCMRequestAssistTeamFB + + +#------------------------------------------------------ # B0 05 开始世界传送 #tagCMWorldTransfer class tagCMWorldTransfer(Structure): -- Gitblit v1.8.0