From 96c0ba31f74064e59c746921fcd1386cddf78d42 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期四, 12 六月 2025 18:26:49 +0800 Subject: [PATCH] 121 【武将】武将系统-服务端(武将锁定、解锁;) --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 56 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 89d132b..324f86d 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py @@ -17484,6 +17484,62 @@ #------------------------------------------------------ +# B2 38 武将锁定 #tagCSHeroLock + +class tagCSHeroLock(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("ItemIndex", c_ushort), #武将物品所在武将背包位置索引 + ("IsLock", c_ubyte), #0-解锁;1-锁定 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xB2 + self.SubCmd = 0x38 + 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 = 0x38 + self.ItemIndex = 0 + self.IsLock = 0 + return + + def GetLength(self): + return sizeof(tagCSHeroLock) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B2 38 武将锁定 //tagCSHeroLock: + Cmd:%s, + SubCmd:%s, + ItemIndex:%d, + IsLock:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.ItemIndex, + self.IsLock + ) + return DumpString + + +m_NAtagCSHeroLock=tagCSHeroLock() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCSHeroLock.Cmd,m_NAtagCSHeroLock.SubCmd))] = m_NAtagCSHeroLock + + +#------------------------------------------------------ # B2 30 武将升级 #tagCSHeroLVUP class tagCSHeroLVUP(Structure): -- Gitblit v1.8.0