From bcaa39b97f1e9789e7960a0101430b1dccbae426 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期四, 30 十一月 2023 15:37:09 +0800 Subject: [PATCH] 10019 【砍树】回合战斗(与NPC基础回合战斗) --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py | 72 ++++++++++++++++++++++++++++++++++++ 1 files changed, 72 insertions(+), 0 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py index 03c840d..e72f5df 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py @@ -47123,6 +47123,78 @@ #------------------------------------------------------ +# B4 20 回合制战斗状态 #tagMCTurnFightState + +class tagMCTurnFightState(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("MapID", c_int), # 自定义地图ID,可用于绑定战斗场景功能(如野外关卡,爬塔功能,竞技场等) + ("FuncLineID", c_ushort), + ("PlayerID", c_int), # 对应玩家ID,可为0,某些功能可能有用,如竞技场 + ("State", c_ubyte), # 0-开始;1-进行中;2-结束 + ("TurnNum", c_ubyte), # 当前轮次 + ("TurnMax", c_ubyte), # 最大轮次 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xB4 + self.SubCmd = 0x20 + 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 = 0xB4 + self.SubCmd = 0x20 + self.MapID = 0 + self.FuncLineID = 0 + self.PlayerID = 0 + self.State = 0 + self.TurnNum = 0 + self.TurnMax = 0 + return + + def GetLength(self): + return sizeof(tagMCTurnFightState) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B4 20 回合制战斗状态 //tagMCTurnFightState: + Cmd:%s, + SubCmd:%s, + MapID:%d, + FuncLineID:%d, + PlayerID:%d, + State:%d, + TurnNum:%d, + TurnMax:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.MapID, + self.FuncLineID, + self.PlayerID, + self.State, + self.TurnNum, + self.TurnMax + ) + return DumpString + + +m_NAtagMCTurnFightState=tagMCTurnFightState() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCTurnFightState.Cmd,m_NAtagMCTurnFightState.SubCmd))] = m_NAtagMCTurnFightState + + +#------------------------------------------------------ # C1 09 跨服排位玩家信息 #tagMCChampionshipPlayerInfo class tagMCChampionshipPlayerInfo(Structure): -- Gitblit v1.8.0