| | |
| | | #------------------------------------------------------
|
| | | # A7 17 聊天气泡框状态 #tagMCChatBubbleBoxState
|
| | |
|
| | | class tagMCChatBubbleBoxState(Structure):
|
| | | class tagMCChatBubbleBox(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("BoxState", c_int), # 按二进制位存储代表是否已开启,暂支持31位,以后有需要再加
|
| | | ("BoxID", c_ubyte), #气泡ID
|
| | | ("State", c_ubyte), #是否已激活
|
| | | ("EndTime", c_int), #到期时间戳,0为永久
|
| | | ("Star", c_ubyte), #星级
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA7
|
| | | self.SubCmd = 0x17
|
| | | return
|
| | |
|
| | | def ReadData(self, stringData, _pos=0, _len=0):
|
| | |
| | | return _pos + self.GetLength()
|
| | |
|
| | | def Clear(self):
|
| | | self.Cmd = 0xA7
|
| | | self.SubCmd = 0x17
|
| | | self.BoxState = 0
|
| | | self.BoxID = 0
|
| | | self.State = 0
|
| | | self.EndTime = 0
|
| | | self.Star = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCChatBubbleBoxState)
|
| | | return sizeof(tagMCChatBubbleBox)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A7 17 聊天气泡框状态 //tagMCChatBubbleBoxState:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | BoxState:%d
|
| | | BoxID:%d,
|
| | | State:%d,
|
| | | EndTime:%d,
|
| | | Star:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.BoxState
|
| | | self.BoxID,
|
| | | self.State,
|
| | | self.EndTime,
|
| | | self.Star
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCChatBubbleBoxState(Structure):
|
| | | Head = tagHead()
|
| | | Count = 0 #(BYTE Count)
|
| | | BoxList = list() #(vector<tagMCChatBubbleBox> BoxList)
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA7
|
| | | self.Head.SubCmd = 0x17
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.Count):
|
| | | temBoxList = tagMCChatBubbleBox()
|
| | | _pos = temBoxList.ReadData(_lpData, _pos)
|
| | | self.BoxList.append(temBoxList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA7
|
| | | self.Head.SubCmd = 0x17
|
| | | self.Count = 0
|
| | | self.BoxList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | for i in range(self.Count):
|
| | | length += self.BoxList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.Count)
|
| | | for i in range(self.Count):
|
| | | data = CommFunc.WriteString(data, self.BoxList[i].GetLength(), self.BoxList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Count:%d,
|
| | | BoxList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCChatBubbleBoxState=tagMCChatBubbleBoxState()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCChatBubbleBoxState.Cmd,m_NAtagMCChatBubbleBoxState.SubCmd))] = m_NAtagMCChatBubbleBoxState
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCChatBubbleBoxState.Head.Cmd,m_NAtagMCChatBubbleBoxState.Head.SubCmd))] = m_NAtagMCChatBubbleBoxState
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A7 21 表情包信息 #tagMCEmojiPackInfo
|
| | |
|
| | | class tagMCEmojiPack(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("PackID", c_ubyte), #表情包ID
|
| | | ("State", c_ubyte), #是否已激活
|
| | | ("EndTime", c_int), #到期时间戳,0为永久
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | 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.PackID = 0
|
| | | self.State = 0
|
| | | self.EndTime = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCEmojiPack)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A7 21 表情包信息 //tagMCEmojiPackInfo:
|
| | | PackID:%d,
|
| | | State:%d,
|
| | | EndTime:%d
|
| | | '''\
|
| | | %(
|
| | | self.PackID,
|
| | | self.State,
|
| | | self.EndTime
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCEmojiPackInfo(Structure):
|
| | | Head = tagHead()
|
| | | Count = 0 #(BYTE Count)
|
| | | EmojiPackList = list() #(vector<tagMCEmojiPack> EmojiPackList)
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA7
|
| | | self.Head.SubCmd = 0x21
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.Count):
|
| | | temEmojiPackList = tagMCEmojiPack()
|
| | | _pos = temEmojiPackList.ReadData(_lpData, _pos)
|
| | | self.EmojiPackList.append(temEmojiPackList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA7
|
| | | self.Head.SubCmd = 0x21
|
| | | self.Count = 0
|
| | | self.EmojiPackList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | for i in range(self.Count):
|
| | | length += self.EmojiPackList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.Count)
|
| | | for i in range(self.Count):
|
| | | data = CommFunc.WriteString(data, self.EmojiPackList[i].GetLength(), self.EmojiPackList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | Count:%d,
|
| | | EmojiPackList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Count,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCEmojiPackInfo=tagMCEmojiPackInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCEmojiPackInfo.Head.Cmd,m_NAtagMCEmojiPackInfo.Head.SubCmd))] = m_NAtagMCEmojiPackInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A7 15 通知仙盟抢Boss伤血信息 #tagMCFamilyBossHurtList
|
| | |
|
| | | class tagMCFamilyBossHurt(Structure):
|