From ab4d62787cf6958470cecaaaf5758877e0a64c02 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期三, 28 五月 2025 11:57:13 +0800 Subject: [PATCH] 54 【三国主界面】核心主体-服务端(仙树;增加货币41-战锤;42-结晶) --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py | 108 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 108 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 6cefeb0..a8b7ed3 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py @@ -20967,6 +20967,114 @@ #------------------------------------------------------ +# B2 23 仙树升级 #tagCMTreeLVUP + +class tagCMTreeLVUP(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("Type", c_ubyte), # 0-开始升级(请求扣除消耗,开始升级倒计时);1-执行升级(前端自行倒计时,时间到后发送该类型) + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xB2 + self.SubCmd = 0x23 + 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 = 0x23 + self.Type = 0 + return + + def GetLength(self): + return sizeof(tagCMTreeLVUP) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B2 23 仙树升级 //tagCMTreeLVUP: + Cmd:%s, + SubCmd:%s, + Type:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.Type + ) + return DumpString + + +m_NAtagCMTreeLVUP=tagCMTreeLVUP() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMTreeLVUP.Cmd,m_NAtagCMTreeLVUP.SubCmd))] = m_NAtagCMTreeLVUP + + +#------------------------------------------------------ +# B2 24 使用仙树升级减时物品 #tagCMUseTreeLVUPTimeItem + +class tagCMUseTreeLVUPTimeItem(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("UseCount", c_int), # 使用个数 + ("IsAutoBuy", c_ubyte), # 不足个数是否自动购买 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xB2 + self.SubCmd = 0x24 + 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 = 0x24 + self.UseCount = 0 + self.IsAutoBuy = 0 + return + + def GetLength(self): + return sizeof(tagCMUseTreeLVUPTimeItem) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B2 24 使用仙树升级减时物品 //tagCMUseTreeLVUPTimeItem: + Cmd:%s, + SubCmd:%s, + UseCount:%d, + IsAutoBuy:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.UseCount, + self.IsAutoBuy + ) + return DumpString + + +m_NAtagCMUseTreeLVUPTimeItem=tagCMUseTreeLVUPTimeItem() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMUseTreeLVUPTimeItem.Cmd,m_NAtagCMUseTreeLVUPTimeItem.SubCmd))] = m_NAtagCMUseTreeLVUPTimeItem + + +#------------------------------------------------------ # B3 17 情戒解锁 #tagCMLoveRingUnlock class tagCMLoveRingUnlock(Structure): -- Gitblit v1.8.0