From 277715f147476b807ce46a3e839aa41b08ef2fc4 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期日, 25 十一月 2018 18:18:46 +0800 Subject: [PATCH] 4762 【后端】助战机器人AI及伤血; --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py | 272 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 270 insertions(+), 2 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py index 4c5a166..6b0bc08 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py @@ -4755,6 +4755,58 @@ #------------------------------------------------------ +# A2 30 设置聊天气泡框 #tagCMSetChatBubbleBox + +class tagCMSetChatBubbleBox(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("BubbleBoxType", c_ubyte), #气泡框类型 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xA2 + self.SubCmd = 0x30 + 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 = 0x30 + self.BubbleBoxType = 0 + return + + def GetLength(self): + return sizeof(tagCMSetChatBubbleBox) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A2 30 设置聊天气泡框 //tagCMSetChatBubbleBox: + Cmd:%s, + SubCmd:%s, + BubbleBoxType:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.BubbleBoxType + ) + return DumpString + + +m_NAtagCMSetChatBubbleBox=tagCMSetChatBubbleBox() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMSetChatBubbleBox.Cmd,m_NAtagCMSetChatBubbleBox.SubCmd))] = m_NAtagCMSetChatBubbleBox + + +#------------------------------------------------------ # A2 22 设置引导成功 #tagCMSetGuideOK class tagCMSetGuideOK(Structure): @@ -8849,6 +8901,58 @@ #------------------------------------------------------ +# A5 56 神兵激活 #tagCMGodWeaponActivate + +class tagCMGodWeaponActivate(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("WeaponType", c_int), # 神兵类型 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xA5 + self.SubCmd = 0x56 + 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 = 0xA5 + self.SubCmd = 0x56 + self.WeaponType = 0 + return + + def GetLength(self): + return sizeof(tagCMGodWeaponActivate) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A5 56 神兵激活 //tagCMGodWeaponActivate: + Cmd:%s, + SubCmd:%s, + WeaponType:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.WeaponType + ) + return DumpString + + +m_NAtagCMGodWeaponActivate=tagCMGodWeaponActivate() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMGodWeaponActivate.Cmd,m_NAtagCMGodWeaponActivate.SubCmd))] = m_NAtagCMGodWeaponActivate + + +#------------------------------------------------------ # A5 55 神兵升级 #tagCMGodWeaponPlus class tagCMGodWeaponPlus(Structure): @@ -8858,6 +8962,8 @@ ("SubCmd", c_ubyte), ("WeaponType", c_int), # 神兵类型 ("ItemID", c_int), #消耗的物品ID + ("ItemCount", c_ubyte), #消耗个数,默认1 + ("IsAutoBuy", c_ubyte), #是否自动购买,默认0 ] def __init__(self): @@ -8876,6 +8982,8 @@ self.SubCmd = 0x55 self.WeaponType = 0 self.ItemID = 0 + self.ItemCount = 0 + self.IsAutoBuy = 0 return def GetLength(self): @@ -8889,13 +8997,17 @@ Cmd:%s, SubCmd:%s, WeaponType:%d, - ItemID:%d + ItemID:%d, + ItemCount:%d, + IsAutoBuy:%d '''\ %( self.Cmd, self.SubCmd, self.WeaponType, - self.ItemID + self.ItemID, + self.ItemCount, + self.IsAutoBuy ) return DumpString @@ -13187,6 +13299,162 @@ #------------------------------------------------------ +# B1 06 助战召唤 #tagCMHelpBattleCall + +class tagCMHelpBattleCall(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("IsOneKeyCall", c_ubyte), # 是否一键召唤 + ("PlayerID", c_int), # 召唤的玩家ID,大于1小于100代表机器人 + ("IsGoldCall", c_ubyte), # 是否仙玉召唤 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xB1 + self.SubCmd = 0x06 + 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 = 0xB1 + self.SubCmd = 0x06 + self.IsOneKeyCall = 0 + self.PlayerID = 0 + self.IsGoldCall = 0 + return + + def GetLength(self): + return sizeof(tagCMHelpBattleCall) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B1 06 助战召唤 //tagCMHelpBattleCall: + Cmd:%s, + SubCmd:%s, + IsOneKeyCall:%d, + PlayerID:%d, + IsGoldCall:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.IsOneKeyCall, + self.PlayerID, + self.IsGoldCall + ) + return DumpString + + +m_NAtagCMHelpBattleCall=tagCMHelpBattleCall() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMHelpBattleCall.Cmd,m_NAtagCMHelpBattleCall.SubCmd))] = m_NAtagCMHelpBattleCall + + +#------------------------------------------------------ +# B1 05 助战登记 #tagCMHelpBattleCheckIn + +class tagCMHelpBattleCheckIn(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xB1 + self.SubCmd = 0x05 + 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 = 0xB1 + self.SubCmd = 0x05 + return + + def GetLength(self): + return sizeof(tagCMHelpBattleCheckIn) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B1 05 助战登记 //tagCMHelpBattleCheckIn: + Cmd:%s, + SubCmd:%s + '''\ + %( + self.Cmd, + self.SubCmd + ) + return DumpString + + +m_NAtagCMHelpBattleCheckIn=tagCMHelpBattleCheckIn() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMHelpBattleCheckIn.Cmd,m_NAtagCMHelpBattleCheckIn.SubCmd))] = m_NAtagCMHelpBattleCheckIn + + +#------------------------------------------------------ +# B1 07 助战刷新 #tagCMHelpBattleRefresh + +class tagCMHelpBattleRefresh(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xB1 + self.SubCmd = 0x07 + 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 = 0xB1 + self.SubCmd = 0x07 + return + + def GetLength(self): + return sizeof(tagCMHelpBattleRefresh) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B1 07 助战刷新 //tagCMHelpBattleRefresh: + Cmd:%s, + SubCmd:%s + '''\ + %( + self.Cmd, + self.SubCmd + ) + return DumpString + + +m_NAtagCMHelpBattleRefresh=tagCMHelpBattleRefresh() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMHelpBattleRefresh.Cmd,m_NAtagCMHelpBattleRefresh.SubCmd))] = m_NAtagCMHelpBattleRefresh + + +#------------------------------------------------------ # B1 02 领取多倍副本奖励 #tagCMGetMultiFBPrize class tagCMGetMultiFBPrize(Structure): -- Gitblit v1.8.0