From 33613b88f90e400e28c6e501dcda240be80bf34f Mon Sep 17 00:00:00 2001 From: hch <305670599@qq.com> Date: 星期二, 21 五月 2019 14:38:08 +0800 Subject: [PATCH] 6603 【后端】【2.0】增加新版的sp和被动技能 - buff中增加固定技能伤害 --- ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py | 440 +++++++++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 376 insertions(+), 64 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py index c85c0c1..673212c 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetSendPack.py @@ -3371,6 +3371,190 @@ #------------------------------------------------------ +# A9 05 通知广播装备详细信息 #tagGCNotifyEquipDetailInfo + +class tagGCNotifyEquipClassEquip(Structure): + _pack_ = 1 + _fields_ = [ + ("ItemID", c_int), + ("Star", 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.ItemID = 0 + self.Star = 0 + return + + def GetLength(self): + return sizeof(tagGCNotifyEquipClassEquip) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A9 05 通知广播装备详细信息 //tagGCNotifyEquipDetailInfo: + ItemID:%d, + Star:%d + '''\ + %( + self.ItemID, + self.Star + ) + return DumpString + + +class tagGCNotifyEquipDetailInfo(Structure): + Head = tagHead() + ItemGUID = "" #(char ItemGUID[40]) + ItemID = 0 #(DWORD ItemID) + Star = 0 #(BYTE Star)//星级 + PlusLV = 0 #(WORD PlusLV)//强化等级 + EvolveLV = 0 #(BYTE EvolveLV)//进化等级 + WashLV = 0 #(BYTE WashLV)//洗练等级 + WashValueCount = 0 #(BYTE WashValueCount) + WashValueList = list() #(vector<WORD> WashValueList)//洗练值 + StoneIDCount = 0 #(BYTE StoneIDCount) + StoneIDList = list() #(vector<DWORD> StoneIDList)//宝石 + ClassEquipCount = 0 #(BYTE ClassEquipCount) + ClassEquipList = list() #(vector<tagGCNotifyEquipClassEquip> ClassEquipList)//本境界穿戴的装备 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA9 + self.Head.SubCmd = 0x05 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.ItemGUID,_pos = CommFunc.ReadString(_lpData, _pos,40) + self.ItemID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Star,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.PlusLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.EvolveLV,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.WashLV,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.WashValueCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.WashValueCount): + value,_pos=CommFunc.ReadWORD(_lpData,_pos) + self.WashValueList.append(value) + self.StoneIDCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.StoneIDCount): + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) + self.StoneIDList.append(value) + self.ClassEquipCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.ClassEquipCount): + temClassEquipList = tagGCNotifyEquipClassEquip() + _pos = temClassEquipList.ReadData(_lpData, _pos) + self.ClassEquipList.append(temClassEquipList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA9 + self.Head.SubCmd = 0x05 + self.ItemGUID = "" + self.ItemID = 0 + self.Star = 0 + self.PlusLV = 0 + self.EvolveLV = 0 + self.WashLV = 0 + self.WashValueCount = 0 + self.WashValueList = list() + self.StoneIDCount = 0 + self.StoneIDList = list() + self.ClassEquipCount = 0 + self.ClassEquipList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 40 + length += 4 + length += 1 + length += 2 + length += 1 + length += 1 + length += 1 + length += 2 * self.WashValueCount + length += 1 + length += 4 * self.StoneIDCount + length += 1 + for i in range(self.ClassEquipCount): + length += self.ClassEquipList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteString(data, 40, self.ItemGUID) + data = CommFunc.WriteDWORD(data, self.ItemID) + data = CommFunc.WriteBYTE(data, self.Star) + data = CommFunc.WriteWORD(data, self.PlusLV) + data = CommFunc.WriteBYTE(data, self.EvolveLV) + data = CommFunc.WriteBYTE(data, self.WashLV) + data = CommFunc.WriteBYTE(data, self.WashValueCount) + for i in range(self.WashValueCount): + data = CommFunc.WriteWORD(data, self.WashValueList[i]) + data = CommFunc.WriteBYTE(data, self.StoneIDCount) + for i in range(self.StoneIDCount): + data = CommFunc.WriteDWORD(data, self.StoneIDList[i]) + data = CommFunc.WriteBYTE(data, self.ClassEquipCount) + for i in range(self.ClassEquipCount): + data = CommFunc.WriteString(data, self.ClassEquipList[i].GetLength(), self.ClassEquipList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + ItemGUID:%s, + ItemID:%d, + Star:%d, + PlusLV:%d, + EvolveLV:%d, + WashLV:%d, + WashValueCount:%d, + WashValueList:%s, + StoneIDCount:%d, + StoneIDList:%s, + ClassEquipCount:%d, + ClassEquipList:%s + '''\ + %( + self.Head.OutputString(), + self.ItemGUID, + self.ItemID, + self.Star, + self.PlusLV, + self.EvolveLV, + self.WashLV, + self.WashValueCount, + "...", + self.StoneIDCount, + "...", + self.ClassEquipCount, + "..." + ) + return DumpString + + +m_NAtagGCNotifyEquipDetailInfo=tagGCNotifyEquipDetailInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCNotifyEquipDetailInfo.Head.Cmd,m_NAtagGCNotifyEquipDetailInfo.Head.SubCmd))] = m_NAtagGCNotifyEquipDetailInfo + + +#------------------------------------------------------ #A9 03 开服活动奖励数量刷新#tagGCOpenServerCampaignAwardCount class tagGCOpenServerCampaignAwardCount(Structure): @@ -16470,6 +16654,8 @@ ("Cmd", c_ubyte), ("SubCmd", c_ubyte), ("BeginTime", c_int), #开始计时时间 + ("BuffTime", c_int), #buff剩余时间 + ("BuffAddRate", c_int), #buff加成万分率 ("CurExp", c_int), #当前总经验 ("CurExpPoint", c_int), #当前总经验点 ] @@ -16489,6 +16675,8 @@ self.Cmd = 0xA3 self.SubCmd = 0x27 self.BeginTime = 0 + self.BuffTime = 0 + self.BuffAddRate = 0 self.CurExp = 0 self.CurExpPoint = 0 return @@ -16504,6 +16692,8 @@ Cmd:%s, SubCmd:%s, BeginTime:%d, + BuffTime:%d, + BuffAddRate:%d, CurExp:%d, CurExpPoint:%d '''\ @@ -16511,6 +16701,8 @@ self.Cmd, self.SubCmd, self.BeginTime, + self.BuffTime, + self.BuffAddRate, self.CurExp, self.CurExpPoint ) @@ -16774,11 +16966,11 @@ #------------------------------------------------------ # A3 09 技能五行专精信息 #tagMCSkillElementInfo -class tagMCSkillElementData(Structure): +class tagMCSkillElementActiveData(Structure): _pack_ = 1 _fields_ = [ - ("MainSkillID", c_int), # 主技能ID - ("ElementSkillID", c_int), # 专精技能ID + ("SkillID", c_int), # 技能ID + ("ActiveLV", c_ubyte), # 激活等级 ] def __init__(self): @@ -16791,24 +16983,88 @@ return _pos + self.GetLength() def Clear(self): - self.MainSkillID = 0 - self.ElementSkillID = 0 + self.SkillID = 0 + self.ActiveLV = 0 return def GetLength(self): - return sizeof(tagMCSkillElementData) + return sizeof(tagMCSkillElementActiveData) def GetBuffer(self): return string_at(addressof(self), self.GetLength()) def OutputString(self): DumpString = '''// A3 09 技能五行专精信息 //tagMCSkillElementInfo: + SkillID:%d, + ActiveLV:%d + '''\ + %( + self.SkillID, + self.ActiveLV + ) + return DumpString + + +class tagMCSkillElementData(Structure): + MainSkillID = 0 #(DWORD MainSkillID)// 主技能ID + ElementSkillID = 0 #(DWORD ElementSkillID)// 选择的专精技能ID + SkillCnt = 0 #(BYTE SkillCnt)// 数量 + ActiveSkill = list() #(vector<tagMCSkillElementActiveData> ActiveSkill)// 激活的技能ID + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.MainSkillID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ElementSkillID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.SkillCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.SkillCnt): + temActiveSkill = tagMCSkillElementActiveData() + _pos = temActiveSkill.ReadData(_lpData, _pos) + self.ActiveSkill.append(temActiveSkill) + return _pos + + def Clear(self): + self.MainSkillID = 0 + self.ElementSkillID = 0 + self.SkillCnt = 0 + self.ActiveSkill = list() + return + + def GetLength(self): + length = 0 + length += 4 + length += 4 + length += 1 + for i in range(self.SkillCnt): + length += self.ActiveSkill[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteDWORD(data, self.MainSkillID) + data = CommFunc.WriteDWORD(data, self.ElementSkillID) + data = CommFunc.WriteBYTE(data, self.SkillCnt) + for i in range(self.SkillCnt): + data = CommFunc.WriteString(data, self.ActiveSkill[i].GetLength(), self.ActiveSkill[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' MainSkillID:%d, - ElementSkillID:%d + ElementSkillID:%d, + SkillCnt:%d, + ActiveSkill:%s '''\ %( self.MainSkillID, - self.ElementSkillID + self.ElementSkillID, + self.SkillCnt, + "..." ) return DumpString @@ -29501,6 +29757,118 @@ #------------------------------------------------------ +# B2 13 天星塔通关层数 #tagMCSkyTowerInfo + +class tagMCSkyTowerInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("Floor", c_int), # 已通关层 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xB2 + 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 = 0xB2 + self.SubCmd = 0x13 + self.Floor = 0 + return + + def GetLength(self): + return sizeof(tagMCSkyTowerInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B2 13 天星塔通关层数 //tagMCSkyTowerInfo: + Cmd:%s, + SubCmd:%s, + Floor:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.Floor + ) + return DumpString + + +m_NAtagMCSkyTowerInfo=tagMCSkyTowerInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCSkyTowerInfo.Cmd,m_NAtagMCSkyTowerInfo.SubCmd))] = m_NAtagMCSkyTowerInfo + + +#------------------------------------------------------ +# B2 16 开始自定义场景结果 #tagMCStartCustomSceneResult + +class tagMCStartCustomSceneResult(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("MapID", c_int), + ("FuncLineID", c_ushort), + ("Result", c_ubyte), #是否允许 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xB2 + self.SubCmd = 0x16 + 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 = 0x16 + self.MapID = 0 + self.FuncLineID = 0 + self.Result = 0 + return + + def GetLength(self): + return sizeof(tagMCStartCustomSceneResult) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B2 16 开始自定义场景结果 //tagMCStartCustomSceneResult: + Cmd:%s, + SubCmd:%s, + MapID:%d, + FuncLineID:%d, + Result:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.MapID, + self.FuncLineID, + self.Result + ) + return DumpString + + +m_NAtagMCStartCustomSceneResult=tagMCStartCustomSceneResult() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCStartCustomSceneResult.Cmd,m_NAtagMCStartCustomSceneResult.SubCmd))] = m_NAtagMCStartCustomSceneResult + + +#------------------------------------------------------ #B2 02 推送提醒设置通知 #tagMCPushNotificationsSetting class tagMCPushNotificationsSetting(Structure): @@ -29621,62 +29989,6 @@ m_NAtagMCZhuXianBossCnt=tagMCZhuXianBossCnt() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCZhuXianBossCnt.Cmd,m_NAtagMCZhuXianBossCnt.SubCmd))] = m_NAtagMCZhuXianBossCnt - - -#------------------------------------------------------ -# B2 13 诛仙塔通关层数 #tagMCZhuXianTowerInfo - -class tagMCZhuXianTowerInfo(Structure): - _pack_ = 1 - _fields_ = [ - ("Cmd", c_ubyte), - ("SubCmd", c_ubyte), - ("Floor", c_int), # 已通关层 - ("LastFloor", c_int), # 上次挑战层 - ] - - def __init__(self): - self.Clear() - self.Cmd = 0xB2 - 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 = 0xB2 - self.SubCmd = 0x13 - self.Floor = 0 - self.LastFloor = 0 - return - - def GetLength(self): - return sizeof(tagMCZhuXianTowerInfo) - - def GetBuffer(self): - return string_at(addressof(self), self.GetLength()) - - def OutputString(self): - DumpString = '''// B2 13 诛仙塔通关层数 //tagMCZhuXianTowerInfo: - Cmd:%s, - SubCmd:%s, - Floor:%d, - LastFloor:%d - '''\ - %( - self.Cmd, - self.SubCmd, - self.Floor, - self.LastFloor - ) - return DumpString - - -m_NAtagMCZhuXianTowerInfo=tagMCZhuXianTowerInfo() -ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCZhuXianTowerInfo.Cmd,m_NAtagMCZhuXianTowerInfo.SubCmd))] = m_NAtagMCZhuXianTowerInfo #------------------------------------------------------ -- Gitblit v1.8.0