From edc3910a9d090e5df4deb2dbc37709a740375938 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期四, 12 六月 2025 12:18:42 +0800 Subject: [PATCH] 121 【武将】武将系统-服务端(图鉴;) --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 60 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 cae4322..89d132b 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py @@ -17372,6 +17372,66 @@ #------------------------------------------------------ +# B2 37 武将图鉴激活升级 #tagCSHeroBookUP + +class tagCSHeroBookUP(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("HeroID", c_int), #武将ID + ("ItemIndex", c_ushort), #关联武将物品所在武将背包索引,激活时可不用发 + ("BookType", c_ubyte), #图鉴激活类型: 0-初始激活;1-星级升级;2-突破等级升级 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xB2 + self.SubCmd = 0x37 + 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 = 0x37 + self.HeroID = 0 + self.ItemIndex = 0 + self.BookType = 0 + return + + def GetLength(self): + return sizeof(tagCSHeroBookUP) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B2 37 武将图鉴激活升级 //tagCSHeroBookUP: + Cmd:%s, + SubCmd:%s, + HeroID:%d, + ItemIndex:%d, + BookType:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.HeroID, + self.ItemIndex, + self.BookType + ) + return DumpString + + +m_NAtagCSHeroBookUP=tagCSHeroBookUP() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCSHeroBookUP.Cmd,m_NAtagCSHeroBookUP.SubCmd))] = m_NAtagCSHeroBookUP + + +#------------------------------------------------------ # B2 32 武将突破 #tagCSHeroBreak class tagCSHeroBreak(Structure): -- Gitblit v1.8.0