From e168d76d7d1f3cb94e2e3e9f6051dc80986fdc01 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期四, 01 十一月 2018 17:14:21 +0800 Subject: [PATCH] 4399 【后端】【1.2.0】聊天新增支持气泡框选择功能 --- ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 52 insertions(+), 0 deletions(-) diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py b/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py index 4c5a166..7d701e2 100644 --- a/ServerPython/CoreServerGroup/GameServer/Script/ChPyNetPack.py +++ b/ServerPython/CoreServerGroup/GameServer/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): -- Gitblit v1.8.0