| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #B3 07 语音聊天 #tagCGVoiceChat
|
| | |
|
| | | class tagCGVoiceChat(Structure):
|
| | | Head = tagHead()
|
| | | ChannelType = 0 #(BYTE ChannelType)// 1 世界 2 仙盟 3 私聊(好友) 4 队伍 -------查看封包tagCMVoiceChat 5 区域 |
| | | TargetNameLen = 0 #(BYTE TargetNameLen)
|
| | | TargetName = "" #(String TargetName)//size = TargetNameLen
|
| | | TargetID = 0 #(DWORD TargetID)// 默认发玩家ID,没有ID才发名称
|
| | | Len = 0 #(WORD Len)
|
| | | Content = list() #(vector<BYTE> Content)//size = Len
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xB3
|
| | | self.Head.SubCmd = 0x07
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.ChannelType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.TargetNameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.TargetName,_pos = CommFunc.ReadString(_lpData, _pos,self.TargetNameLen)
|
| | | self.TargetID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Len,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | for i in range(self.Len):
|
| | | value,_pos=CommFunc.ReadBYTE(_lpData,_pos)
|
| | | self.Content.append(value)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xB3
|
| | | self.Head.SubCmd = 0x07
|
| | | self.ChannelType = 0
|
| | | self.TargetNameLen = 0
|
| | | self.TargetName = ""
|
| | | self.TargetID = 0
|
| | | self.Len = 0
|
| | | self.Content = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 1
|
| | | length += len(self.TargetName)
|
| | | length += 4
|
| | | length += 2
|
| | | length += 1 * self.Len
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.ChannelType)
|
| | | data = CommFunc.WriteBYTE(data, self.TargetNameLen)
|
| | | data = CommFunc.WriteString(data, self.TargetNameLen, self.TargetName)
|
| | | data = CommFunc.WriteDWORD(data, self.TargetID)
|
| | | data = CommFunc.WriteWORD(data, self.Len)
|
| | | for i in range(self.Len):
|
| | | data = CommFunc.WriteBYTE(data, self.Content[i])
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ChannelType:%d,
|
| | | TargetNameLen:%d,
|
| | | TargetName:%s,
|
| | | TargetID:%d,
|
| | | Len:%d,
|
| | | Content:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ChannelType,
|
| | | self.TargetNameLen,
|
| | | self.TargetName,
|
| | | self.TargetID,
|
| | | self.Len,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCGVoiceChat=tagCGVoiceChat()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCGVoiceChat.Head.Cmd,m_NAtagCGVoiceChat.Head.SubCmd))] = m_NAtagCGVoiceChat
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #B3 03 是否允许加入好友的回应#tagCGJoinFriendAnswer
|
| | |
|
| | | class tagCGJoinFriendAnswer(Structure):
|
| | |
| | | ("GroupValue2", c_int), #分组值2,与分组值1组合归为同组榜单数据
|
| | | ("StartIndex", c_ushort), #查看的起始名次索引, 默认0
|
| | | ("ViewCnt", c_ubyte), #查看条数,默认20,单次最大不超过100
|
| | | ("ViewID", c_int), #附带查看指定ID所在名次前后数据,如玩家ID、家族ID等,仅首页查询时有效,即StartIndex为0时
|
| | | ("ViewID", c_int), #附带查看指定ID所在名次前后数据,如玩家ID、家族ID等
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A2 17 喇叭聊天 #tagCMPYSpeaker
|
| | |
|
| | | class tagCMPYSpeaker(Structure):
|
| | | Head = tagHead()
|
| | | SpeakerType = 0 #(BYTE SpeakerType)//1-本服;2-跨服
|
| | | IsUseGold = 0 #(BYTE IsUseGold)//是否使用钻石
|
| | | ItemIndex = 0 #(BYTE ItemIndex)//使用物品说话时, 物品Index
|
| | | TextLen = 0 #(WORD TextLen)//字符长度
|
| | | Text = "" #(String Text)//size = TextLen
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA2
|
| | | self.Head.SubCmd = 0x17
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.SpeakerType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.IsUseGold,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.ItemIndex,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.TextLen,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.Text,_pos = CommFunc.ReadString(_lpData, _pos,self.TextLen)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA2
|
| | | self.Head.SubCmd = 0x17
|
| | | self.SpeakerType = 0
|
| | | self.IsUseGold = 0
|
| | | self.ItemIndex = 0
|
| | | self.TextLen = 0
|
| | | self.Text = ""
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 1
|
| | | length += 1
|
| | | length += 2
|
| | | length += len(self.Text)
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.SpeakerType)
|
| | | data = CommFunc.WriteBYTE(data, self.IsUseGold)
|
| | | data = CommFunc.WriteBYTE(data, self.ItemIndex)
|
| | | data = CommFunc.WriteWORD(data, self.TextLen)
|
| | | data = CommFunc.WriteString(data, self.TextLen, self.Text)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | SpeakerType:%d,
|
| | | IsUseGold:%d,
|
| | | ItemIndex:%d,
|
| | | TextLen:%d,
|
| | | Text:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.SpeakerType,
|
| | | self.IsUseGold,
|
| | | self.ItemIndex,
|
| | | self.TextLen,
|
| | | self.Text
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMPYSpeaker=tagCMPYSpeaker()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMPYSpeaker.Head.Cmd,m_NAtagCMPYSpeaker.Head.SubCmd))] = m_NAtagCMPYSpeaker
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A2 16 自定义玩家聊天 #tagCMPyTalk
|
| | |
|
| | | class tagCMPyTalk(Structure):
|
| | | Head = tagHead()
|
| | | TalkType = 0 #(BYTE TalkType)// 自定义聊天类型
|
| | | Len = 0 #(WORD Len)
|
| | | Content = "" #(String Content)//size = Len
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA2
|
| | | self.Head.SubCmd = 0x16
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.TalkType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.Len,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.Content,_pos = CommFunc.ReadString(_lpData, _pos,self.Len)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA2
|
| | | self.Head.SubCmd = 0x16
|
| | | self.TalkType = 0
|
| | | self.Len = 0
|
| | | self.Content = ""
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 2
|
| | | length += len(self.Content)
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.TalkType)
|
| | | data = CommFunc.WriteWORD(data, self.Len)
|
| | | data = CommFunc.WriteString(data, self.Len, self.Content)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | TalkType:%d,
|
| | | Len:%d,
|
| | | Content:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.TalkType,
|
| | | self.Len,
|
| | | self.Content
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMPyTalk=tagCMPyTalk()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMPyTalk.Head.Cmd,m_NAtagCMPyTalk.Head.SubCmd))] = m_NAtagCMPyTalk
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #A2 11 查询世界Boss伤血列表 #tagCMQueryBossHurtList
|
| | |
|
| | | class tagCMQueryBossHurtList(Structure):
|
| | |
| | |
|
| | | m_NAtagCMClientTaskCount=tagCMClientTaskCount()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMClientTaskCount.Cmd,m_NAtagCMClientTaskCount.SubCmd))] = m_NAtagCMClientTaskCount
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #A2 26 语音聊天 #tagCMVoiceChat
|
| | |
|
| | | class tagCMVoiceChat(Structure):
|
| | | Head = tagHead()
|
| | | ChannelType = 0 #(BYTE ChannelType)// 5 区域 --- 查看封包tagCGVoiceChat 1 世界 2 仙盟 3 私聊(好友) 4 队伍
|
| | | TargetNameLen = 0 #(BYTE TargetNameLen)
|
| | | TargetName = "" #(String TargetName)//size = TargetNameLen
|
| | | TargetID = 0 #(DWORD TargetID)// 私聊默认发玩家ID,没有ID才发名称
|
| | | Len = 0 #(WORD Len)
|
| | | Content = list() #(vector<BYTE> Content)//size = Len
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA2
|
| | | self.Head.SubCmd = 0x26
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.ChannelType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.TargetNameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.TargetName,_pos = CommFunc.ReadString(_lpData, _pos,self.TargetNameLen)
|
| | | self.TargetID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.Len,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | for i in range(self.Len):
|
| | | value,_pos=CommFunc.ReadBYTE(_lpData,_pos)
|
| | | self.Content.append(value)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA2
|
| | | self.Head.SubCmd = 0x26
|
| | | self.ChannelType = 0
|
| | | self.TargetNameLen = 0
|
| | | self.TargetName = ""
|
| | | self.TargetID = 0
|
| | | self.Len = 0
|
| | | self.Content = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 1
|
| | | length += len(self.TargetName)
|
| | | length += 4
|
| | | length += 2
|
| | | length += 1 * self.Len
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.ChannelType)
|
| | | data = CommFunc.WriteBYTE(data, self.TargetNameLen)
|
| | | data = CommFunc.WriteString(data, self.TargetNameLen, self.TargetName)
|
| | | data = CommFunc.WriteDWORD(data, self.TargetID)
|
| | | data = CommFunc.WriteWORD(data, self.Len)
|
| | | for i in range(self.Len):
|
| | | data = CommFunc.WriteBYTE(data, self.Content[i])
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ChannelType:%d,
|
| | | TargetNameLen:%d,
|
| | | TargetName:%s,
|
| | | TargetID:%d,
|
| | | Len:%d,
|
| | | Content:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ChannelType,
|
| | | self.TargetNameLen,
|
| | | self.TargetName,
|
| | | self.TargetID,
|
| | | self.Len,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMVoiceChat=tagCMVoiceChat()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMVoiceChat.Head.Cmd,m_NAtagCMVoiceChat.Head.SubCmd))] = m_NAtagCMVoiceChat
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B3 20 聊天 #tagCMTalk
|
| | |
|
| | | class tagCMPyTalk(Structure):
|
| | | Head = tagHead()
|
| | | ChannelType = 0 #(BYTE ChannelType)// 频道
|
| | | Len = 0 #(WORD Len)
|
| | | Content = "" #(String Content)//size = Len
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xB3
|
| | | self.Head.SubCmd = 0x20
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.ChannelType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.Len,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.Content,_pos = CommFunc.ReadString(_lpData, _pos,self.Len)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xB3
|
| | | self.Head.SubCmd = 0x20
|
| | | self.ChannelType = 0
|
| | | self.Len = 0
|
| | | self.Content = ""
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 2
|
| | | length += len(self.Content)
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.ChannelType)
|
| | | data = CommFunc.WriteWORD(data, self.Len)
|
| | | data = CommFunc.WriteString(data, self.Len, self.Content)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | ChannelType:%d,
|
| | | Len:%d,
|
| | | Content:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.ChannelType,
|
| | | self.Len,
|
| | | self.Content
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B4 11 镜像战斗 #tagCMMirrorFight
|
| | |
|
| | | class tagCMMirrorFight(Structure):
|