From 210de0f61fd5f7acd758cd2e01168ea2438cf969 Mon Sep 17 00:00:00 2001 From: xdh <xiefantasy@qq.com> Date: 星期一, 29 四月 2019 15:20:05 +0800 Subject: [PATCH] 6607 【2.0】【后端】技能升级功能改版(加等级限制) --- ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py | 342 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 342 insertions(+), 0 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py index d3f3dda..c85c0c1 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py @@ -15532,6 +15532,114 @@ #------------------------------------------------------ +# A3 25 NPC已攻击次数信息 #tagMCNPCAttackCountInfo + +class tagMCNPCAttackCount(Structure): + _pack_ = 1 + _fields_ = [ + ("NPCID", c_int), + ("AttackCount", c_ubyte), #已攻击次数 + ] + + def __init__(self): + self.Clear() + 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.NPCID = 0 + self.AttackCount = 0 + return + + def GetLength(self): + return sizeof(tagMCNPCAttackCount) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A3 25 NPC已攻击次数信息 //tagMCNPCAttackCountInfo: + NPCID:%d, + AttackCount:%d + '''\ + %( + self.NPCID, + self.AttackCount + ) + return DumpString + + +class tagMCNPCAttackCountInfo(Structure): + Head = tagHead() + Count = 0 #(BYTE Count) + NPCAttackCountList = list() #(vector<tagMCNPCAttackCount> NPCAttackCountList) + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA3 + self.Head.SubCmd = 0x25 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.Count): + temNPCAttackCountList = tagMCNPCAttackCount() + _pos = temNPCAttackCountList.ReadData(_lpData, _pos) + self.NPCAttackCountList.append(temNPCAttackCountList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA3 + self.Head.SubCmd = 0x25 + self.Count = 0 + self.NPCAttackCountList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + for i in range(self.Count): + length += self.NPCAttackCountList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.Count) + for i in range(self.Count): + data = CommFunc.WriteString(data, self.NPCAttackCountList[i].GetLength(), self.NPCAttackCountList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + Count:%d, + NPCAttackCountList:%s + '''\ + %( + self.Head.OutputString(), + self.Count, + "..." + ) + return DumpString + + +m_NAtagMCNPCAttackCountInfo=tagMCNPCAttackCountInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCNPCAttackCountInfo.Head.Cmd,m_NAtagMCNPCAttackCountInfo.Head.SubCmd))] = m_NAtagMCNPCAttackCountInfo + + +#------------------------------------------------------ # A3 26 NPCID已采集次数信息 #tagMCNPCIDCollectionCntInfo class tagMCNPCIDCollectionCnt(Structure): @@ -16661,6 +16769,114 @@ m_NAtagMCSingleGoldGift=tagMCSingleGoldGift() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCSingleGoldGift.Cmd,m_NAtagMCSingleGoldGift.SubCmd))] = m_NAtagMCSingleGoldGift + + +#------------------------------------------------------ +# A3 09 技能五行专精信息 #tagMCSkillElementInfo + +class tagMCSkillElementData(Structure): + _pack_ = 1 + _fields_ = [ + ("MainSkillID", c_int), # 主技能ID + ("ElementSkillID", c_int), # 专精技能ID + ] + + def __init__(self): + self.Clear() + 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.MainSkillID = 0 + self.ElementSkillID = 0 + return + + def GetLength(self): + return sizeof(tagMCSkillElementData) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A3 09 技能五行专精信息 //tagMCSkillElementInfo: + MainSkillID:%d, + ElementSkillID:%d + '''\ + %( + self.MainSkillID, + self.ElementSkillID + ) + return DumpString + + +class tagMCSkillElementInfo(Structure): + Head = tagHead() + Cnt = 0 #(BYTE Cnt)// 数量 + InfoList = list() #(vector<tagMCSkillElementData> InfoList) + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA3 + self.Head.SubCmd = 0x09 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.Cnt,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.Cnt): + temInfoList = tagMCSkillElementData() + _pos = temInfoList.ReadData(_lpData, _pos) + self.InfoList.append(temInfoList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA3 + self.Head.SubCmd = 0x09 + self.Cnt = 0 + self.InfoList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + for i in range(self.Cnt): + length += self.InfoList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.Cnt) + for i in range(self.Cnt): + data = CommFunc.WriteString(data, self.InfoList[i].GetLength(), self.InfoList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + Cnt:%d, + InfoList:%s + '''\ + %( + self.Head.OutputString(), + self.Cnt, + "..." + ) + return DumpString + + +m_NAtagMCSkillElementInfo=tagMCSkillElementInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCSkillElementInfo.Head.Cmd,m_NAtagMCSkillElementInfo.Head.SubCmd))] = m_NAtagMCSkillElementInfo #------------------------------------------------------ @@ -20115,6 +20331,84 @@ m_NAtagMCNPCShow=tagMCNPCShow() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCNPCShow.Cmd,m_NAtagMCNPCShow.SubCmd))] = m_NAtagMCNPCShow + + +#------------------------------------------------------ +# A7 19 查询玩家境界阶装备信息结果 #tagSCPlayerEquipCacheResult + +class tagSCPlayerEquipCacheResult(Structure): + Head = tagHead() + PlayerID = 0 #(DWORD PlayerID)//玩家ID + EquipClassLV = 0 #(BYTE EquipClassLV) + ItemDataSize = 0 #(WORD ItemDataSize) + ItemData = "" #(String ItemData)//物品记录 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA7 + self.Head.SubCmd = 0x19 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.PlayerID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.EquipClassLV,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.ItemDataSize,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.ItemData,_pos = CommFunc.ReadString(_lpData, _pos,self.ItemDataSize) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA7 + self.Head.SubCmd = 0x19 + self.PlayerID = 0 + self.EquipClassLV = 0 + self.ItemDataSize = 0 + self.ItemData = "" + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 4 + length += 1 + length += 2 + length += len(self.ItemData) + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteDWORD(data, self.PlayerID) + data = CommFunc.WriteBYTE(data, self.EquipClassLV) + data = CommFunc.WriteWORD(data, self.ItemDataSize) + data = CommFunc.WriteString(data, self.ItemDataSize, self.ItemData) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + PlayerID:%d, + EquipClassLV:%d, + ItemDataSize:%d, + ItemData:%s + '''\ + %( + self.Head.OutputString(), + self.PlayerID, + self.EquipClassLV, + self.ItemDataSize, + self.ItemData + ) + return DumpString + + +m_NAtagSCPlayerEquipCacheResult=tagSCPlayerEquipCacheResult() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagSCPlayerEquipCacheResult.Head.Cmd,m_NAtagSCPlayerEquipCacheResult.Head.SubCmd))] = m_NAtagSCPlayerEquipCacheResult #------------------------------------------------------ @@ -27824,6 +28118,54 @@ #------------------------------------------------------ +#B1 08 开始印记流失时间 #tagMCYinjiStartTime + +class tagMCYinjiStartTime(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xB1 + self.SubCmd = 0x08 + 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 = 0xB1 + self.SubCmd = 0x08 + return + + def GetLength(self): + return sizeof(tagMCYinjiStartTime) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''//B1 08 开始印记流失时间 //tagMCYinjiStartTime: + Cmd:%s, + SubCmd:%s + '''\ + %( + self.Cmd, + self.SubCmd + ) + return DumpString + + +m_NAtagMCYinjiStartTime=tagMCYinjiStartTime() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCYinjiStartTime.Cmd,m_NAtagMCYinjiStartTime.SubCmd))] = m_NAtagMCYinjiStartTime + + +#------------------------------------------------------ # B2 08 获得仙缘币信息 #tagMCAddXianyuanCoinMsg class tagMCAddXianyuanCoinMsg(Structure): -- Gitblit v1.8.0