From 6eee8d7a2d4cdd93c71449b66b8b5ad39f99a0dc Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期三, 18 九月 2024 11:09:05 +0800 Subject: [PATCH] 1111 【越南】【砍树】【英文】废弃23048和平光环技能buff验证; --- ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py | 522 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 504 insertions(+), 18 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py index 331497e..e0356cc 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py @@ -379,6 +379,58 @@ #------------------------------------------------------ +# A4 13 修改家族徽章 #tagCGChangeFamilyEmblem + +class tagCGChangeFamilyEmblem(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("EmblemID", c_ubyte), # 更换的徽章ID + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xA4 + self.SubCmd = 0x13 + 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 = 0xA4 + self.SubCmd = 0x13 + self.EmblemID = 0 + return + + def GetLength(self): + return sizeof(tagCGChangeFamilyEmblem) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A4 13 修改家族徽章 //tagCGChangeFamilyEmblem: + Cmd:%s, + SubCmd:%s, + EmblemID:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.EmblemID + ) + return DumpString + + +m_NAtagCGChangeFamilyEmblem=tagCGChangeFamilyEmblem() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCGChangeFamilyEmblem.Cmd,m_NAtagCGChangeFamilyEmblem.SubCmd))] = m_NAtagCGChangeFamilyEmblem + + +#------------------------------------------------------ # A4 08 查询家族行为信息 #tagCGQueryFamilyAction class tagCGQueryFamilyAction(Structure): @@ -712,6 +764,7 @@ Head = tagHead() Name = "" #(char Name[33]) FakeID = 0 #(WORD FakeID)//假仙盟编号 + EmblemID = 0 #(BYTE EmblemID)//选择徽章ID,解锁仙盟等级为1级的均为可选ID data = None def __init__(self): @@ -725,6 +778,7 @@ _pos = self.Head.ReadData(_lpData, _pos) self.Name,_pos = CommFunc.ReadString(_lpData, _pos,33) self.FakeID,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.EmblemID,_pos = CommFunc.ReadBYTE(_lpData, _pos) return _pos def Clear(self): @@ -734,6 +788,7 @@ self.Head.SubCmd = 0x04 self.Name = "" self.FakeID = 0 + self.EmblemID = 0 return def GetLength(self): @@ -741,6 +796,7 @@ length += self.Head.GetLength() length += 33 length += 2 + length += 1 return length @@ -749,18 +805,21 @@ data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) data = CommFunc.WriteString(data, 33, self.Name) data = CommFunc.WriteWORD(data, self.FakeID) + data = CommFunc.WriteBYTE(data, self.EmblemID) return data def OutputString(self): DumpString = ''' Head:%s, Name:%s, - FakeID:%d + FakeID:%d, + EmblemID:%d '''\ %( self.Head.OutputString(), self.Name, - self.FakeID + self.FakeID, + self.EmblemID ) return DumpString @@ -1252,6 +1311,58 @@ #------------------------------------------------------ +# A9 07 点赞仙宫 #tagCGLikeXiangong + +class tagCGLikeXiangong(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("XiangongID", c_ushort), # 仙宫ID,为0时代表每日的仙宫点赞 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xA9 + self.SubCmd = 0x07 + 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 = 0x07 + self.XiangongID = 0 + return + + def GetLength(self): + return sizeof(tagCGLikeXiangong) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A9 07 点赞仙宫 //tagCGLikeXiangong: + Cmd:%s, + SubCmd:%s, + XiangongID:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.XiangongID + ) + return DumpString + + +m_NAtagCGLikeXiangong=tagCGLikeXiangong() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCGLikeXiangong.Cmd,m_NAtagCGLikeXiangong.SubCmd))] = m_NAtagCGLikeXiangong + + +#------------------------------------------------------ # A9 A5 查看竞技场对战玩家最新信息 #tagCGQueryArenaBattlePlayer class tagCGQueryArenaBattlePlayer(Structure): @@ -1569,6 +1680,58 @@ m_NAtagCGQueryRecommendFriends=tagCGQueryRecommendFriends() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCGQueryRecommendFriends.Cmd,m_NAtagCGQueryRecommendFriends.SubCmd))] = m_NAtagCGQueryRecommendFriends + + +#------------------------------------------------------ +# A9 06 查看仙宫仙名录 #tagCGQueryXiangongRecPlayers + +class tagCGQueryXiangongRecPlayers(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("XiangongID", c_ushort), # 仙宫ID + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xA9 + 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 = 0xA9 + self.SubCmd = 0x06 + self.XiangongID = 0 + return + + def GetLength(self): + return sizeof(tagCGQueryXiangongRecPlayers) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A9 06 查看仙宫仙名录 //tagCGQueryXiangongRecPlayers: + Cmd:%s, + SubCmd:%s, + XiangongID:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.XiangongID + ) + return DumpString + + +m_NAtagCGQueryXiangongRecPlayers=tagCGQueryXiangongRecPlayers() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCGQueryXiangongRecPlayers.Cmd,m_NAtagCGQueryXiangongRecPlayers.SubCmd))] = m_NAtagCGQueryXiangongRecPlayers #------------------------------------------------------ @@ -6074,6 +6237,58 @@ m_NAtagCMBuyItemBack=tagCMBuyItemBack() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMBuyItemBack.Cmd,m_NAtagCMBuyItemBack.SubCmd))] = m_NAtagCMBuyItemBack + + +#------------------------------------------------------ +# A2 36 聊天气泡框升星 #tagCMChatBubbleBoxStarUP + +class tagCMChatBubbleBoxStarUP(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("BoxID", c_ubyte), #气泡ID + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xA2 + self.SubCmd = 0x36 + 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 = 0xA2 + self.SubCmd = 0x36 + self.BoxID = 0 + return + + def GetLength(self): + return sizeof(tagCMChatBubbleBoxStarUP) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A2 36 聊天气泡框升星 //tagCMChatBubbleBoxStarUP: + Cmd:%s, + SubCmd:%s, + BoxID:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.BoxID + ) + return DumpString + + +m_NAtagCMChatBubbleBoxStarUP=tagCMChatBubbleBoxStarUP() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMChatBubbleBoxStarUP.Cmd,m_NAtagCMChatBubbleBoxStarUP.SubCmd))] = m_NAtagCMChatBubbleBoxStarUP #------------------------------------------------------ @@ -19253,6 +19468,214 @@ #------------------------------------------------------ +# B2 26 头像幻化 #tagCMFaceChange + +class tagCMFaceChange(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("FaceID", c_int), # 幻化的ID + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xB2 + self.SubCmd = 0x26 + 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 = 0x26 + self.FaceID = 0 + return + + def GetLength(self): + return sizeof(tagCMFaceChange) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B2 26 头像幻化 //tagCMFaceChange: + Cmd:%s, + SubCmd:%s, + FaceID:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.FaceID + ) + return DumpString + + +m_NAtagCMFaceChange=tagCMFaceChange() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMFaceChange.Cmd,m_NAtagCMFaceChange.SubCmd))] = m_NAtagCMFaceChange + + +#------------------------------------------------------ +# B2 28 头像框幻化 #tagCMFacePicChange + +class tagCMFacePicChange(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("FacePicID", c_int), # 幻化的ID + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xB2 + self.SubCmd = 0x28 + 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 = 0x28 + self.FacePicID = 0 + return + + def GetLength(self): + return sizeof(tagCMFacePicChange) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B2 28 头像框幻化 //tagCMFacePicChange: + Cmd:%s, + SubCmd:%s, + FacePicID:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.FacePicID + ) + return DumpString + + +m_NAtagCMFacePicChange=tagCMFacePicChange() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMFacePicChange.Cmd,m_NAtagCMFacePicChange.SubCmd))] = m_NAtagCMFacePicChange + + +#------------------------------------------------------ +# B2 29 头像框升星 #tagCMFacePicStarUP + +class tagCMFacePicStarUP(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("FacePicID", c_int), + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xB2 + self.SubCmd = 0x29 + 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 = 0x29 + self.FacePicID = 0 + return + + def GetLength(self): + return sizeof(tagCMFacePicStarUP) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B2 29 头像框升星 //tagCMFacePicStarUP: + Cmd:%s, + SubCmd:%s, + FacePicID:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.FacePicID + ) + return DumpString + + +m_NAtagCMFacePicStarUP=tagCMFacePicStarUP() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMFacePicStarUP.Cmd,m_NAtagCMFacePicStarUP.SubCmd))] = m_NAtagCMFacePicStarUP + + +#------------------------------------------------------ +# B2 27 头像升星 #tagCMFaceStarUP + +class tagCMFaceStarUP(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("FaceID", c_int), + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xB2 + self.SubCmd = 0x27 + 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 = 0x27 + self.FaceID = 0 + return + + def GetLength(self): + return sizeof(tagCMFaceStarUP) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B2 27 头像升星 //tagCMFaceStarUP: + Cmd:%s, + SubCmd:%s, + FaceID:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.FaceID + ) + return DumpString + + +m_NAtagCMFaceStarUP=tagCMFaceStarUP() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMFaceStarUP.Cmd,m_NAtagCMFaceStarUP.SubCmd))] = m_NAtagCMFaceStarUP + + +#------------------------------------------------------ # B2 25 新聚魂操作 #tagCMGatherTheSoulOP class tagCMGatherTheSoulOP(Structure): @@ -19471,18 +19894,15 @@ #------------------------------------------------------ # B2 17 古宝升星 #tagCMGubaoStarUp -class tagCMGubaoStarUp(Structure): +class tagCMGubaoPieceUse(Structure): _pack_ = 1 _fields_ = [ - ("Cmd", c_ubyte), - ("SubCmd", c_ubyte), - ("GubaoID", c_ushort), + ("GubaoID", c_ushort), # 通用碎片古宝ID + ("PieceCount", c_ushort), # 使用碎片个数 ] def __init__(self): self.Clear() - self.Cmd = 0xB2 - self.SubCmd = 0x17 return def ReadData(self, stringData, _pos=0, _len=0): @@ -19491,33 +19911,99 @@ return _pos + self.GetLength() def Clear(self): - self.Cmd = 0xB2 - self.SubCmd = 0x17 self.GubaoID = 0 + self.PieceCount = 0 return def GetLength(self): - return sizeof(tagCMGubaoStarUp) + return sizeof(tagCMGubaoPieceUse) def GetBuffer(self): return string_at(addressof(self), self.GetLength()) def OutputString(self): DumpString = '''// B2 17 古宝升星 //tagCMGubaoStarUp: - Cmd:%s, - SubCmd:%s, - GubaoID:%d + GubaoID:%d, + PieceCount:%d '''\ %( - self.Cmd, - self.SubCmd, - self.GubaoID + self.GubaoID, + self.PieceCount + ) + return DumpString + + +class tagCMGubaoStarUp(Structure): + Head = tagHead() + GubaoID = 0 #(WORD GubaoID) + PieceSelectCount = 0 #(BYTE PieceSelectCount) + CommPieceUseList = list() #(vector<tagCMGubaoPieceUse> CommPieceUseList)// 通用古宝碎片使用列表 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB2 + self.Head.SubCmd = 0x17 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.GubaoID,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.PieceSelectCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.PieceSelectCount): + temCommPieceUseList = tagCMGubaoPieceUse() + _pos = temCommPieceUseList.ReadData(_lpData, _pos) + self.CommPieceUseList.append(temCommPieceUseList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB2 + self.Head.SubCmd = 0x17 + self.GubaoID = 0 + self.PieceSelectCount = 0 + self.CommPieceUseList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 2 + length += 1 + for i in range(self.PieceSelectCount): + length += self.CommPieceUseList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteWORD(data, self.GubaoID) + data = CommFunc.WriteBYTE(data, self.PieceSelectCount) + for i in range(self.PieceSelectCount): + data = CommFunc.WriteString(data, self.CommPieceUseList[i].GetLength(), self.CommPieceUseList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + GubaoID:%d, + PieceSelectCount:%d, + CommPieceUseList:%s + '''\ + %( + self.Head.OutputString(), + self.GubaoID, + self.PieceSelectCount, + "..." ) return DumpString m_NAtagCMGubaoStarUp=tagCMGubaoStarUp() -ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMGubaoStarUp.Cmd,m_NAtagCMGubaoStarUp.SubCmd))] = m_NAtagCMGubaoStarUp +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMGubaoStarUp.Head.Cmd,m_NAtagCMGubaoStarUp.Head.SubCmd))] = m_NAtagCMGubaoStarUp #------------------------------------------------------ -- Gitblit v1.8.0