From a1f053eb420898b323a18b9e260aaec34af2992a Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期日, 08 十月 2023 14:49:30 +0800 Subject: [PATCH] 9896 【BT0.1】【主干】坐骑、灵宠、称号升星 --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py | 156 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 156 insertions(+), 0 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py index 04f4a00..11c4858 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py @@ -11954,6 +11954,58 @@ #------------------------------------------------------ +# A5 35 坐骑升星 #tagCMHorseStarUp + +class tagCMHorseStarUp(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("HorseID", c_int), #坐骑ID,对应坐骑表ID + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xA5 + self.SubCmd = 0x35 + 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 = 0xA5 + self.SubCmd = 0x35 + self.HorseID = 0 + return + + def GetLength(self): + return sizeof(tagCMHorseStarUp) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A5 35 坐骑升星 //tagCMHorseStarUp: + Cmd:%s, + SubCmd:%s, + HorseID:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.HorseID + ) + return DumpString + + +m_NAtagCMHorseStarUp=tagCMHorseStarUp() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMHorseStarUp.Cmd,m_NAtagCMHorseStarUp.SubCmd))] = m_NAtagCMHorseStarUp + + +#------------------------------------------------------ # A5 31 坐骑培养 #tagCMHorseTrain class tagCMHorseTrain(Structure): @@ -13425,6 +13477,58 @@ #------------------------------------------------------ +# A5 36 称号升星 #tagCMTitleStarUp + +class tagCMTitleStarUp(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("TitleID", c_int), #称号ID + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xA5 + 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 = 0xA5 + self.SubCmd = 0x36 + self.TitleID = 0 + return + + def GetLength(self): + return sizeof(tagCMTitleStarUp) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A5 36 称号升星 //tagCMTitleStarUp: + Cmd:%s, + SubCmd:%s, + TitleID:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.TitleID + ) + return DumpString + + +m_NAtagCMTitleStarUp=tagCMTitleStarUp() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMTitleStarUp.Cmd,m_NAtagCMTitleStarUp.SubCmd))] = m_NAtagCMTitleStarUp + + +#------------------------------------------------------ # A5 11 试用首充武器 #tagCMTryFirstGoldItem class tagCMTryFirstGoldItem(Structure): @@ -14366,6 +14470,58 @@ #------------------------------------------------------ +# A7 06 宠物升星 #tagCMPetStarUp + +class tagCMPetStarUp(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("PetItemIndex", c_ubyte), #宠物数据背包索引 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xA7 + 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 = 0xA7 + self.SubCmd = 0x06 + self.PetItemIndex = 0 + return + + def GetLength(self): + return sizeof(tagCMPetStarUp) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A7 06 宠物升星 //tagCMPetStarUp: + Cmd:%s, + SubCmd:%s, + PetItemIndex:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.PetItemIndex + ) + return DumpString + + +m_NAtagCMPetStarUp=tagCMPetStarUp() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMPetStarUp.Cmd,m_NAtagCMPetStarUp.SubCmd))] = m_NAtagCMPetStarUp + + +#------------------------------------------------------ # A7 05 宠物培养 #tagCMPetTrain class tagCMPetTrain(Structure): -- Gitblit v1.8.0