From 4551dd1308ab484688ca96be2be8b811fd3a23e6 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期二, 12 二月 2019 21:02:45 +0800 Subject: [PATCH] 6196 【后端】【1.6】跨服匹配添加机器人 --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py | 100 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 100 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 0116cd3..108b33c 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py @@ -3772,6 +3772,54 @@ #------------------------------------------------------ +# A2 31 前端开始自定义场景 #tagCMClientStartCustomScene + +class tagCMClientStartCustomScene(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xA2 + self.SubCmd = 0x31 + 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 = 0xA2 + self.SubCmd = 0x31 + return + + def GetLength(self): + return sizeof(tagCMClientStartCustomScene) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A2 31 前端开始自定义场景 //tagCMClientStartCustomScene: + Cmd:%s, + SubCmd:%s + '''\ + %( + self.Cmd, + self.SubCmd + ) + return DumpString + + +m_NAtagCMClientStartCustomScene=tagCMClientStartCustomScene() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMClientStartCustomScene.Cmd,m_NAtagCMClientStartCustomScene.SubCmd))] = m_NAtagCMClientStartCustomScene + + +#------------------------------------------------------ # A2 24 触碰NPC #tagCMTouchNPC class tagCMTouchNPC(Structure): @@ -15786,6 +15834,58 @@ #------------------------------------------------------ +# C1 08 跨服PK挑战机器人结算 #tagCMCrossRealmPKRobotOver + +class tagCMCrossRealmPKRobotOver(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("IsWin", c_ubyte), #是否获胜 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xC1 + self.SubCmd = 0x08 + 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 = 0xC1 + self.SubCmd = 0x08 + self.IsWin = 0 + return + + def GetLength(self): + return sizeof(tagCMCrossRealmPKRobotOver) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// C1 08 跨服PK挑战机器人结算 //tagCMCrossRealmPKRobotOver: + Cmd:%s, + SubCmd:%s, + IsWin:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.IsWin + ) + return DumpString + + +m_NAtagCMCrossRealmPKRobotOver=tagCMCrossRealmPKRobotOver() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMCrossRealmPKRobotOver.Cmd,m_NAtagCMCrossRealmPKRobotOver.SubCmd))] = m_NAtagCMCrossRealmPKRobotOver + + +#------------------------------------------------------ # C1 05 进入跨服地图 #tagCMEnterCrossServer class tagCMEnterCrossServer(Structure): -- Gitblit v1.8.0