From ccaefa2a93fb82d0db5fc7e74832a292fb860984 Mon Sep 17 00:00:00 2001 From: xdh <xiefantasy@qq.com> Date: 星期二, 22 一月 2019 14:23:20 +0800 Subject: [PATCH] 5919 【后端】【1.5.100】诛仙塔功能开发 --- ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py | 110 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 109 insertions(+), 1 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py index dd9d7b5..1df956a 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py +++ b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py @@ -6089,6 +6089,62 @@ #------------------------------------------------------ +# A3 30 装备诛仙装备 #tagCMEquipZhuXianItem + +class tagCMEquipZhuXianItem(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("EquipIndex", c_ubyte), #装备在诛仙装备背包中的索引 + ("ItemIndex", c_ubyte), #装备在诛仙物品背包中的索引 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xA3 + self.SubCmd = 0x30 + 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 = 0xA3 + self.SubCmd = 0x30 + self.EquipIndex = 0 + self.ItemIndex = 0 + return + + def GetLength(self): + return sizeof(tagCMEquipZhuXianItem) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A3 30 装备诛仙装备 //tagCMEquipZhuXianItem: + Cmd:%s, + SubCmd:%s, + EquipIndex:%d, + ItemIndex:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.EquipIndex, + self.ItemIndex + ) + return DumpString + + +m_NAtagCMEquipZhuXianItem=tagCMEquipZhuXianItem() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMEquipZhuXianItem.Cmd,m_NAtagCMEquipZhuXianItem.SubCmd))] = m_NAtagCMEquipZhuXianItem + + +#------------------------------------------------------ # A3 12 守护拾取物品 #tagCMGuardPickupItem class tagCMGuardPickupItem(Structure): @@ -6846,6 +6902,58 @@ m_NAtagCMTrialExchange=tagCMTrialExchange() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMTrialExchange.Cmd,m_NAtagCMTrialExchange.SubCmd))] = m_NAtagCMTrialExchange + + +#------------------------------------------------------ +# A3 31 卸下诛仙装备 #tagCMUnEquipZhuXianItem + +class tagCMUnEquipZhuXianItem(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("EquipIndex", c_ubyte), #装备在诛仙装备背包中的索引 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xA3 + self.SubCmd = 0x31 + 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 = 0xA3 + self.SubCmd = 0x31 + self.EquipIndex = 0 + return + + def GetLength(self): + return sizeof(tagCMUnEquipZhuXianItem) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A3 31 卸下诛仙装备 //tagCMUnEquipZhuXianItem: + Cmd:%s, + SubCmd:%s, + EquipIndex:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.EquipIndex + ) + return DumpString + + +m_NAtagCMUnEquipZhuXianItem=tagCMUnEquipZhuXianItem() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMUnEquipZhuXianItem.Cmd,m_NAtagCMUnEquipZhuXianItem.SubCmd))] = m_NAtagCMUnEquipZhuXianItem #------------------------------------------------------ @@ -15377,7 +15485,7 @@ _fields_ = [ ("Cmd", c_ubyte), ("SubCmd", c_ubyte), - ("ObjID", c_ushort), + ("ObjID", c_int), ("NPCID", c_int), ("PosX", c_ushort), ("PosY", c_ushort), -- Gitblit v1.8.0