| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AE 07 运镖时间倒计时结束 #tagCGTruckTimeEnd
|
| | |
|
| | | class tagCGTruckTimeEnd(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xAE
|
| | | 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 = 0xAE
|
| | | self.SubCmd = 0x07
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCGTruckTimeEnd)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AE 07 运镖时间倒计时结束 //tagCGTruckTimeEnd:
|
| | | Cmd:%s,
|
| | | SubCmd:%s
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCGTruckTimeEnd=tagCGTruckTimeEnd()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCGTruckTimeEnd.Cmd,m_NAtagCGTruckTimeEnd.SubCmd))] = m_NAtagCGTruckTimeEnd
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B0 13 取消协助Boss #tagCGCancelAssistBoss
|
| | |
|
| | | class tagCGCancelAssistBoss(Structure):
|
| | |
| | |
|
| | | m_NAtagCGViewPlayerShortInfo=tagCGViewPlayerShortInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCGViewPlayerShortInfo.Cmd,m_NAtagCGViewPlayerShortInfo.SubCmd))] = m_NAtagCGViewPlayerShortInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #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
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A1 01 玩家电脑信息 #tagCMPCInfo
|
| | |
|
| | | class tagCMPCInfo(Structure):
|
| | | Head = tagHead()
|
| | | PCOSLen = 0 #(BYTE PCOSLen)
|
| | | PCOS = "" #(String PCOS)// 操作系统
|
| | | ResolutionLen = 0 #(BYTE ResolutionLen)
|
| | | Resolution = "" #(String Resolution)// 分辨率
|
| | | BrowserLen = 0 #(BYTE BrowserLen)
|
| | | Browser = "" #(String Browser)// 浏览器
|
| | | ScribeTypeLen = 0 #(BYTE ScribeTypeLen)
|
| | | ScribeType = "" #(String ScribeType)// 记录类型
|
| | | ScribeDataLen = 0 #(BYTE ScribeDataLen)
|
| | | ScribeData = "" #(String ScribeData)// 记录扩展信息
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA1
|
| | | self.Head.SubCmd = 0x01
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.PCOSLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.PCOS,_pos = CommFunc.ReadString(_lpData, _pos,self.PCOSLen)
|
| | | self.ResolutionLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.Resolution,_pos = CommFunc.ReadString(_lpData, _pos,self.ResolutionLen)
|
| | | self.BrowserLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.Browser,_pos = CommFunc.ReadString(_lpData, _pos,self.BrowserLen)
|
| | | self.ScribeTypeLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.ScribeType,_pos = CommFunc.ReadString(_lpData, _pos,self.ScribeTypeLen)
|
| | | self.ScribeDataLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.ScribeData,_pos = CommFunc.ReadString(_lpData, _pos,self.ScribeDataLen)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA1
|
| | | self.Head.SubCmd = 0x01
|
| | | self.PCOSLen = 0
|
| | | self.PCOS = ""
|
| | | self.ResolutionLen = 0
|
| | | self.Resolution = ""
|
| | | self.BrowserLen = 0
|
| | | self.Browser = ""
|
| | | self.ScribeTypeLen = 0
|
| | | self.ScribeType = ""
|
| | | self.ScribeDataLen = 0
|
| | | self.ScribeData = ""
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += len(self.PCOS)
|
| | | length += 1
|
| | | length += len(self.Resolution)
|
| | | length += 1
|
| | | length += len(self.Browser)
|
| | | length += 1
|
| | | length += len(self.ScribeType)
|
| | | length += 1
|
| | | length += len(self.ScribeData)
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.PCOSLen)
|
| | | data = CommFunc.WriteString(data, self.PCOSLen, self.PCOS)
|
| | | data = CommFunc.WriteBYTE(data, self.ResolutionLen)
|
| | | data = CommFunc.WriteString(data, self.ResolutionLen, self.Resolution)
|
| | | data = CommFunc.WriteBYTE(data, self.BrowserLen)
|
| | | data = CommFunc.WriteString(data, self.BrowserLen, self.Browser)
|
| | | data = CommFunc.WriteBYTE(data, self.ScribeTypeLen)
|
| | | data = CommFunc.WriteString(data, self.ScribeTypeLen, self.ScribeType)
|
| | | data = CommFunc.WriteBYTE(data, self.ScribeDataLen)
|
| | | data = CommFunc.WriteString(data, self.ScribeDataLen, self.ScribeData)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | PCOSLen:%d,
|
| | | PCOS:%s,
|
| | | ResolutionLen:%d,
|
| | | Resolution:%s,
|
| | | BrowserLen:%d,
|
| | | Browser:%s,
|
| | | ScribeTypeLen:%d,
|
| | | ScribeType:%s,
|
| | | ScribeDataLen:%d,
|
| | | ScribeData:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.PCOSLen,
|
| | | self.PCOS,
|
| | | self.ResolutionLen,
|
| | | self.Resolution,
|
| | | self.BrowserLen,
|
| | | self.Browser,
|
| | | self.ScribeTypeLen,
|
| | | self.ScribeType,
|
| | | self.ScribeDataLen,
|
| | | self.ScribeData
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMPCInfo=tagCMPCInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMPCInfo.Head.Cmd,m_NAtagCMPCInfo.Head.SubCmd))] = m_NAtagCMPCInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A1 23 查询充值次数 #tagCMQueryCoinToGoldCount
|
| | |
|
| | | class tagCMQueryCoinToGoldCount(Structure):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A2 19 游戏建议收集 #tagCMAdviceSubmit
|
| | | # A1 30 查看榜单 #tagCMViewBillboard
|
| | |
|
| | | class tagCMAdviceSubmit(Structure):
|
| | | Head = tagHead()
|
| | | Type = 0 #(BYTE Type)//提交类型
|
| | | Len = 0 #(WORD Len)
|
| | | Content = "" #(String Content)//size = Len
|
| | | data = None
|
| | | class tagCMViewBillboard(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("Type", c_ubyte), #榜单类型
|
| | | ("GroupValue1", c_int), #分组值1
|
| | | ("GroupValue2", c_int), #分组值2,与分组值1组合归为同组榜单数据
|
| | | ("StartIndex", c_ushort), #查看的起始名次索引, 默认0
|
| | | ("ViewCnt", c_ubyte), #查看条数,默认20,单次最大不超过100
|
| | | ("ViewID", c_int), #附带查看指定ID所在名次前后数据,如玩家ID、家族ID等
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xA2
|
| | | self.Head.SubCmd = 0x19
|
| | | self.Cmd = 0xA1
|
| | | self.SubCmd = 0x30
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | def ReadData(self, stringData, _pos=0, _len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.Type,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.Len,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.Content,_pos = CommFunc.ReadString(_lpData, _pos,self.Len)
|
| | | return _pos
|
| | | memmove(addressof(self), stringData[_pos:], self.GetLength())
|
| | | return _pos + self.GetLength()
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xA2
|
| | | self.Head.SubCmd = 0x19
|
| | | self.Cmd = 0xA1
|
| | | self.SubCmd = 0x30
|
| | | self.Type = 0
|
| | | self.Len = 0
|
| | | self.Content = ""
|
| | | self.GroupValue1 = 0
|
| | | self.GroupValue2 = 0
|
| | | self.StartIndex = 0
|
| | | self.ViewCnt = 0
|
| | | self.ViewID = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 2
|
| | | length += len(self.Content)
|
| | |
|
| | | return length
|
| | | return sizeof(tagCMViewBillboard)
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.Type)
|
| | | data = CommFunc.WriteWORD(data, self.Len)
|
| | | data = CommFunc.WriteString(data, self.Len, self.Content)
|
| | | return data
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | DumpString = '''// A1 30 查看榜单 //tagCMViewBillboard:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | Type:%d,
|
| | | Len:%d,
|
| | | Content:%s
|
| | | GroupValue1:%d,
|
| | | GroupValue2:%d,
|
| | | StartIndex:%d,
|
| | | ViewCnt:%d,
|
| | | ViewID:%d
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.Type,
|
| | | self.Len,
|
| | | self.Content
|
| | | self.GroupValue1,
|
| | | self.GroupValue2,
|
| | | self.StartIndex,
|
| | | self.ViewCnt,
|
| | | self.ViewID
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMAdviceSubmit=tagCMAdviceSubmit()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMAdviceSubmit.Head.Cmd,m_NAtagCMAdviceSubmit.Head.SubCmd))] = m_NAtagCMAdviceSubmit
|
| | | m_NAtagCMViewBillboard=tagCMViewBillboard()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMViewBillboard.Cmd,m_NAtagCMViewBillboard.SubCmd))] = m_NAtagCMViewBillboard
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | |
|
| | | m_NAtagCMOpenLongWarehouse=tagCMOpenLongWarehouse()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMOpenLongWarehouse.Cmd,m_NAtagCMOpenLongWarehouse.SubCmd))] = m_NAtagCMOpenLongWarehouse
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # 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
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | |
|
| | | 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
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A6 17 查询家族行为信息 #tagCMQueryFamilyAction
|
| | |
|
| | | class tagCMQueryFamilyAction(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("ActionType", c_ubyte), # 行为类型
|
| | | ("FamilyID", c_int), # 家族ID,发0默认自己家族
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xA6
|
| | | self.SubCmd = 0x17
|
| | | 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 = 0xA6
|
| | | self.SubCmd = 0x17
|
| | | self.ActionType = 0
|
| | | self.FamilyID = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMQueryFamilyAction)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// A6 17 查询家族行为信息 //tagCMQueryFamilyAction:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | ActionType:%d,
|
| | | FamilyID:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.ActionType,
|
| | | self.FamilyID
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMQueryFamilyAction=tagCMQueryFamilyAction()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMQueryFamilyAction.Cmd,m_NAtagCMQueryFamilyAction.SubCmd))] = m_NAtagCMQueryFamilyAction
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # A6 02 申请加入家族#tagCMRequesJoinFamily
|
| | |
|
| | | class tagCMRequesJoinFamily(Structure):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AE 05 自动运镖 #tagPyAutoTruck
|
| | |
|
| | | class tagPyAutoTruck(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("Type", c_ubyte), |
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xAE
|
| | | 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 = 0xAE
|
| | | self.SubCmd = 0x05
|
| | | self.Type = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagPyAutoTruck)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AE 05 自动运镖 //tagPyAutoTruck:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | Type:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.Type
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagPyAutoTruck=tagPyAutoTruck()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagPyAutoTruck.Cmd,m_NAtagPyAutoTruck.SubCmd))] = m_NAtagPyAutoTruck
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AE 02 购买镖车等级#tagPyBuyTruckLV
|
| | |
|
| | | class tagPyBuyTruckLV(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("TruckLV", c_ubyte), #镖车等级
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xAE
|
| | | self.SubCmd = 0x02
|
| | | 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 = 0xAE
|
| | | self.SubCmd = 0x02
|
| | | self.TruckLV = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagPyBuyTruckLV)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AE 02 购买镖车等级//tagPyBuyTruckLV:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | TruckLV:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.TruckLV
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagPyBuyTruckLV=tagPyBuyTruckLV()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagPyBuyTruckLV.Cmd,m_NAtagPyBuyTruckLV.SubCmd))] = m_NAtagPyBuyTruckLV
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AE 06 立即完成运镖 #tagPyOverTruck
|
| | |
|
| | | class tagPyOverTruck(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xAE
|
| | | 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 = 0xAE
|
| | | self.SubCmd = 0x06
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagPyOverTruck)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AE 06 立即完成运镖 //tagPyOverTruck:
|
| | | Cmd:%s,
|
| | | SubCmd:%s
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagPyOverTruck=tagPyOverTruck()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagPyOverTruck.Cmd,m_NAtagPyOverTruck.SubCmd))] = m_NAtagPyOverTruck
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AE 04 查询劫镖次数#tagPyQueryDestroyTruckCnt
|
| | |
|
| | | class tagPyQueryDestroyTruckCnt(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xAE
|
| | | self.SubCmd = 0x04
|
| | | 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 = 0xAE
|
| | | self.SubCmd = 0x04
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagPyQueryDestroyTruckCnt)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AE 04 查询劫镖次数//tagPyQueryDestroyTruckCnt:
|
| | | Cmd:%s,
|
| | | SubCmd:%s
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagPyQueryDestroyTruckCnt=tagPyQueryDestroyTruckCnt()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagPyQueryDestroyTruckCnt.Cmd,m_NAtagPyQueryDestroyTruckCnt.SubCmd))] = m_NAtagPyQueryDestroyTruckCnt
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AE 03 查询镖车等级#tagPyQueryTruckLV
|
| | |
|
| | | class tagPyQueryTruckLV(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xAE
|
| | | self.SubCmd = 0x03
|
| | | 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 = 0xAE
|
| | | self.SubCmd = 0x03
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagPyQueryTruckLV)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AE 03 查询镖车等级//tagPyQueryTruckLV:
|
| | | Cmd:%s,
|
| | | SubCmd:%s
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagPyQueryTruckLV=tagPyQueryTruckLV()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagPyQueryTruckLV.Cmd,m_NAtagPyQueryTruckLV.SubCmd))] = m_NAtagPyQueryTruckLV
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AE 01 刷新镖车等级#tagPyRefurbishTruckLV
|
| | |
|
| | | class tagPyRefurbishTruckLV(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("CostType", c_ubyte), #消耗类型: 0-道具; 1-货币
|
| | | ("MoneyType", c_ubyte), #花费金钱类型
|
| | | ("ItemID", c_int), #使用的道具ID
|
| | | ("IsAutoBuy", c_ubyte), #道具刷新时是否自动购买; 0-否;1-是
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xAE
|
| | | self.SubCmd = 0x01
|
| | | 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 = 0xAE
|
| | | self.SubCmd = 0x01
|
| | | self.CostType = 0
|
| | | self.MoneyType = 0
|
| | | self.ItemID = 0
|
| | | self.IsAutoBuy = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagPyRefurbishTruckLV)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AE 01 刷新镖车等级//tagPyRefurbishTruckLV:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | CostType:%d,
|
| | | MoneyType:%d,
|
| | | ItemID:%d,
|
| | | IsAutoBuy:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.CostType,
|
| | | self.MoneyType,
|
| | | self.ItemID,
|
| | | self.IsAutoBuy
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagPyRefurbishTruckLV=tagPyRefurbishTruckLV()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagPyRefurbishTruckLV.Cmd,m_NAtagPyRefurbishTruckLV.SubCmd))] = m_NAtagPyRefurbishTruckLV
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AF 01 领取合服当天登陆奖励 # tagCMGetMixLoginDayAward
|
| | |
|
| | | class tagCMGetMixLoginDayAward(Structure):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #B2 01 脱机挂状态 # tagCMLoginState
|
| | | # B2 23 仙树升级 #tagCMTreeLVUP
|
| | |
|
| | | class tagCMLoginState(Structure):
|
| | | class tagCMTreeLVUP(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("State", c_ubyte), # 0正常登录,1脱机登录,2脱机登录死亡
|
| | | ("Type", c_ubyte), # 0-开始升级(请求扣除消耗,开始升级倒计时);1-执行升级(前端自行倒计时,时间到后发送该类型)
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB2
|
| | | self.SubCmd = 0x01
|
| | | self.SubCmd = 0x23
|
| | | return
|
| | |
|
| | | def ReadData(self, stringData, _pos=0, _len=0):
|
| | |
| | |
|
| | | def Clear(self):
|
| | | self.Cmd = 0xB2
|
| | | self.SubCmd = 0x01
|
| | | self.State = 0
|
| | | self.SubCmd = 0x23
|
| | | self.Type = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMLoginState)
|
| | | return sizeof(tagCMTreeLVUP)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''//B2 01 脱机挂状态 // tagCMLoginState:
|
| | | DumpString = '''// B2 23 仙树升级 //tagCMTreeLVUP:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | State:%d
|
| | | Type:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.State
|
| | | self.Type
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMLoginState=tagCMLoginState()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMLoginState.Cmd,m_NAtagCMLoginState.SubCmd))] = m_NAtagCMLoginState
|
| | | m_NAtagCMTreeLVUP=tagCMTreeLVUP()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMTreeLVUP.Cmd,m_NAtagCMTreeLVUP.SubCmd))] = m_NAtagCMTreeLVUP
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #B2 05 推送提醒设置 #tagCMPushNotificationsSetting
|
| | | # B2 24 使用仙树升级减时物品 #tagCMUseTreeLVUPTimeItem
|
| | |
|
| | | class tagCMPushNotificationsSetting(Structure):
|
| | | Head = tagHead()
|
| | | OnoffBit = 0 #(DWORD OnoffBit)// 按位约定开关
|
| | | TimeLen = 0 #(BYTE TimeLen)
|
| | | TimeStr = "" #(String TimeStr)// 时间字符串 01:02-05:00
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xB2
|
| | | self.Head.SubCmd = 0x05
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.OnoffBit,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.TimeLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.TimeStr,_pos = CommFunc.ReadString(_lpData, _pos,self.TimeLen)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xB2
|
| | | self.Head.SubCmd = 0x05
|
| | | self.OnoffBit = 0
|
| | | self.TimeLen = 0
|
| | | self.TimeStr = ""
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 4
|
| | | length += 1
|
| | | length += len(self.TimeStr)
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteDWORD(data, self.OnoffBit)
|
| | | data = CommFunc.WriteBYTE(data, self.TimeLen)
|
| | | data = CommFunc.WriteString(data, self.TimeLen, self.TimeStr)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | OnoffBit:%d,
|
| | | TimeLen:%d,
|
| | | TimeStr:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.OnoffBit,
|
| | | self.TimeLen,
|
| | | self.TimeStr
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMPushNotificationsSetting=tagCMPushNotificationsSetting()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMPushNotificationsSetting.Head.Cmd,m_NAtagCMPushNotificationsSetting.Head.SubCmd))] = m_NAtagCMPushNotificationsSetting
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #B2 02 视野缩放 #tagCMSightZoom
|
| | |
|
| | | class tagCMSightZoom(Structure):
|
| | | class tagCMUseTreeLVUPTimeItem(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("Sight", c_ubyte), # 视野缩放,用于脱机挂不超过最大视野,空闲状态为0,被玩家攻击恢复视野
|
| | | ("UseCount", c_int), # 使用个数
|
| | | ("IsAutoBuy", c_ubyte), # 不足个数是否自动购买
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB2
|
| | | self.SubCmd = 0x02
|
| | | self.SubCmd = 0x24
|
| | | return
|
| | |
|
| | | def ReadData(self, stringData, _pos=0, _len=0):
|
| | |
| | |
|
| | | def Clear(self):
|
| | | self.Cmd = 0xB2
|
| | | self.SubCmd = 0x02
|
| | | self.Sight = 0
|
| | | self.SubCmd = 0x24
|
| | | self.UseCount = 0
|
| | | self.IsAutoBuy = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMSightZoom)
|
| | | return sizeof(tagCMUseTreeLVUPTimeItem)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''//B2 02 视野缩放 //tagCMSightZoom:
|
| | | DumpString = '''// B2 24 使用仙树升级减时物品 //tagCMUseTreeLVUPTimeItem:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | Sight:%d
|
| | | UseCount:%d,
|
| | | IsAutoBuy:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.Sight
|
| | | self.UseCount,
|
| | | self.IsAutoBuy
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMSightZoom=tagCMSightZoom()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMSightZoom.Cmd,m_NAtagCMSightZoom.SubCmd))] = m_NAtagCMSightZoom
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #B2 04 系统设置 #tagCMSystem
|
| | |
|
| | | class tagCMSystem(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("AutoEat", c_ubyte), # 自动吞噬
|
| | | ("AutoReborn", c_ubyte), #自动买活
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB2
|
| | | self.SubCmd = 0x04
|
| | | 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 = 0xB2
|
| | | self.SubCmd = 0x04
|
| | | self.AutoEat = 0
|
| | | self.AutoReborn = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMSystem)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''//B2 04 系统设置 //tagCMSystem:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | AutoEat:%d,
|
| | | AutoReborn:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.AutoEat,
|
| | | self.AutoReborn
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMSystem=tagCMSystem()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMSystem.Cmd,m_NAtagCMSystem.SubCmd))] = m_NAtagCMSystem
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #B2 03 设置脱机挂NPC # tagCMTJGnpc
|
| | |
|
| | | class tagCMTJGnpc(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("NPCID", c_int), # 脱机挂点
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB2
|
| | | self.SubCmd = 0x03
|
| | | 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 = 0xB2
|
| | | self.SubCmd = 0x03
|
| | | self.NPCID = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMTJGnpc)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''//B2 03 设置脱机挂NPC // tagCMTJGnpc:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | NPCID:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.NPCID
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMTJGnpc=tagCMTJGnpc()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMTJGnpc.Cmd,m_NAtagCMTJGnpc.SubCmd))] = m_NAtagCMTJGnpc
|
| | | m_NAtagCMUseTreeLVUPTimeItem=tagCMUseTreeLVUPTimeItem()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMUseTreeLVUPTimeItem.Cmd,m_NAtagCMUseTreeLVUPTimeItem.SubCmd))] = m_NAtagCMUseTreeLVUPTimeItem
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | |
|
| | | m_NAtagCMSendGifts=tagCMSendGifts()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMSendGifts.Cmd,m_NAtagCMSendGifts.SubCmd))] = m_NAtagCMSendGifts
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # 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 0A 脱机挂死亡 # tagCMTJGDead
|
| | |
|
| | | class tagCMTJGDead(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB4
|
| | | self.SubCmd = 0x0A
|
| | | 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 = 0xB4
|
| | | self.SubCmd = 0x0A
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMTJGDead)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''//B4 0A 脱机挂死亡 // tagCMTJGDead:
|
| | | Cmd:%s,
|
| | | SubCmd:%s
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMTJGDead=tagCMTJGDead()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMTJGDead.Cmd,m_NAtagCMTJGDead.SubCmd))] = m_NAtagCMTJGDead
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | #B4 01 带有对象队列和坐标的技能 #tagCMUseSkillEx
|
| | |
|
| | | class tagCMUseSkillEx(Structure):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B9 21 修改功能队伍 #tagCMChangeFuncTeam
|
| | |
|
| | | class tagCMChangeFuncTeam(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("TeamID", c_int), |
| | | ("FuncMapID", c_int), # 功能地图ID或自定义的活动功能ID
|
| | | ("MinLV", c_ushort), #最低等级限制
|
| | | ("MinFightPower", c_int), #最低战力限制,求余亿
|
| | | ("MinFightPowerEx", c_int), #最低战力限制,整除亿
|
| | | ("ServerOnly", c_ubyte), #是否仅本服玩家可加入,0-否,1-是
|
| | | ("NeedCheck", c_ubyte), #是否需要审核
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB9
|
| | | self.SubCmd = 0x21
|
| | | 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 = 0xB9
|
| | | self.SubCmd = 0x21
|
| | | self.TeamID = 0
|
| | | self.FuncMapID = 0
|
| | | self.MinLV = 0
|
| | | self.MinFightPower = 0
|
| | | self.MinFightPowerEx = 0
|
| | | self.ServerOnly = 0
|
| | | self.NeedCheck = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMChangeFuncTeam)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B9 21 修改功能队伍 //tagCMChangeFuncTeam:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | TeamID:%d,
|
| | | FuncMapID:%d,
|
| | | MinLV:%d,
|
| | | MinFightPower:%d,
|
| | | MinFightPowerEx:%d,
|
| | | ServerOnly:%d,
|
| | | NeedCheck:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.TeamID,
|
| | | self.FuncMapID,
|
| | | self.MinLV,
|
| | | self.MinFightPower,
|
| | | self.MinFightPowerEx,
|
| | | self.ServerOnly,
|
| | | self.NeedCheck
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMChangeFuncTeam=tagCMChangeFuncTeam()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMChangeFuncTeam.Cmd,m_NAtagCMChangeFuncTeam.SubCmd))] = m_NAtagCMChangeFuncTeam
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B9 04 修改队伍相关审核状态 #tagCMChangeTeamCheckState
|
| | |
|
| | | class tagCMChangeTeamCheckState(Structure):
|
| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B9 20 创建功能队伍 #tagCMCreateFuncTeam
|
| | |
|
| | | class tagCMCreateFuncTeam(Structure):
|
| | | Head = tagHead()
|
| | | FuncMapID = 0 #(DWORD FuncMapID)// 功能地图ID或自定义的活动功能ID
|
| | | FuncMapEx = 0 #(DWORD FuncMapEx)// 功能地图扩展,如不同的层级
|
| | | NameLen = 0 #(BYTE NameLen)
|
| | | TeamName = "" #(String TeamName)// 队伍名称,可为空
|
| | | MinLV = 0 #(WORD MinLV)//最低等级限制
|
| | | MinFightPower = 0 #(DWORD MinFightPower)//最低战力限制,求余亿
|
| | | MinFightPowerEx = 0 #(DWORD MinFightPowerEx)//最低战力限制,整除亿
|
| | | ServerOnly = 0 #(BYTE ServerOnly)//是否仅本服玩家可加入,0-否,1-是
|
| | | NeedCheck = 0 #(BYTE NeedCheck)//是否需要审核
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xB9
|
| | | self.Head.SubCmd = 0x20
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.FuncMapID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.FuncMapEx,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.NameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.TeamName,_pos = CommFunc.ReadString(_lpData, _pos,self.NameLen)
|
| | | self.MinLV,_pos = CommFunc.ReadWORD(_lpData, _pos)
|
| | | self.MinFightPower,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.MinFightPowerEx,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.ServerOnly,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.NeedCheck,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xB9
|
| | | self.Head.SubCmd = 0x20
|
| | | self.FuncMapID = 0
|
| | | self.FuncMapEx = 0
|
| | | self.NameLen = 0
|
| | | self.TeamName = ""
|
| | | self.MinLV = 0
|
| | | self.MinFightPower = 0
|
| | | self.MinFightPowerEx = 0
|
| | | self.ServerOnly = 0
|
| | | self.NeedCheck = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 4
|
| | | length += 4
|
| | | length += 1
|
| | | length += len(self.TeamName)
|
| | | length += 2
|
| | | length += 4
|
| | | length += 4
|
| | | length += 1
|
| | | length += 1
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteDWORD(data, self.FuncMapID)
|
| | | data = CommFunc.WriteDWORD(data, self.FuncMapEx)
|
| | | data = CommFunc.WriteBYTE(data, self.NameLen)
|
| | | data = CommFunc.WriteString(data, self.NameLen, self.TeamName)
|
| | | data = CommFunc.WriteWORD(data, self.MinLV)
|
| | | data = CommFunc.WriteDWORD(data, self.MinFightPower)
|
| | | data = CommFunc.WriteDWORD(data, self.MinFightPowerEx)
|
| | | data = CommFunc.WriteBYTE(data, self.ServerOnly)
|
| | | data = CommFunc.WriteBYTE(data, self.NeedCheck)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | FuncMapID:%d,
|
| | | FuncMapEx:%d,
|
| | | NameLen:%d,
|
| | | TeamName:%s,
|
| | | MinLV:%d,
|
| | | MinFightPower:%d,
|
| | | MinFightPowerEx:%d,
|
| | | ServerOnly:%d,
|
| | | NeedCheck:%d
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.FuncMapID,
|
| | | self.FuncMapEx,
|
| | | self.NameLen,
|
| | | self.TeamName,
|
| | | self.MinLV,
|
| | | self.MinFightPower,
|
| | | self.MinFightPowerEx,
|
| | | self.ServerOnly,
|
| | | self.NeedCheck
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMCreateFuncTeam=tagCMCreateFuncTeam()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMCreateFuncTeam.Head.Cmd,m_NAtagCMCreateFuncTeam.Head.SubCmd))] = m_NAtagCMCreateFuncTeam
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B9 22 功能队伍成员操作 #tagCMFuncTeamMemOP
|
| | |
|
| | | class tagCMFuncTeamMemOP(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("TeamID", c_int), |
| | | ("FuncMapID", c_int), # 功能地图ID或自定义的活动功能ID
|
| | | ("OPType", c_ubyte), # 1-申请加入;2-申请取消;3-同意入队;4-拒绝入队;5-退出队伍;6-踢出队伍;7-转让队长;8-解散队伍;
|
| | | ("OPData", c_int), # 可选
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB9
|
| | | self.SubCmd = 0x22
|
| | | 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 = 0xB9
|
| | | self.SubCmd = 0x22
|
| | | self.TeamID = 0
|
| | | self.FuncMapID = 0
|
| | | self.OPType = 0
|
| | | self.OPData = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMFuncTeamMemOP)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B9 22 功能队伍成员操作 //tagCMFuncTeamMemOP:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | TeamID:%d,
|
| | | FuncMapID:%d,
|
| | | OPType:%d,
|
| | | OPData:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.TeamID,
|
| | | self.FuncMapID,
|
| | | self.OPType,
|
| | | self.OPData
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMFuncTeamMemOP=tagCMFuncTeamMemOP()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMFuncTeamMemOP.Cmd,m_NAtagCMFuncTeamMemOP.SubCmd))] = m_NAtagCMFuncTeamMemOP
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B9 23 查找功能队伍列表 #tagCMQueryFuncTeam
|
| | |
|
| | | class tagCMQueryFuncTeam(Structure):
|
| | | Head = tagHead()
|
| | | FuncMapID = 0 #(DWORD FuncMapID)// 功能地图ID或自定义的活动功能ID
|
| | | FuncMapEx = 0 #(DWORD FuncMapEx)// 功能地图扩展,如不同的层级,0代表所有
|
| | | StartIndex = 0 #(DWORD StartIndex)// 查看的起始索引, 默认0
|
| | | QueryCnt = 0 #(BYTE QueryCnt)// 查看条数,默认20,最大不超过100
|
| | | HaveSpace = 0 #(BYTE HaveSpace)// 是否只查看有空位置的队伍
|
| | | IDLimitType = 0 #(BYTE IDLimitType)// ID限制类型:1-同仙盟队长;2-同ServerGroupID队长;3-同ServerID队长
|
| | | SearchLen = 0 #(BYTE SearchLen)
|
| | | SearchMsg = "" #(String SearchMsg)// 指定搜索时有用,可搜索指定队伍ID或模糊搜索队伍名称,搜索时返回最多QueryCnt个数的队伍
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xB9
|
| | | self.Head.SubCmd = 0x23
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.FuncMapID,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.FuncMapEx,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.StartIndex,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.QueryCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.HaveSpace,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.IDLimitType,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.SearchLen,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.SearchMsg,_pos = CommFunc.ReadString(_lpData, _pos,self.SearchLen)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xB9
|
| | | self.Head.SubCmd = 0x23
|
| | | self.FuncMapID = 0
|
| | | self.FuncMapEx = 0
|
| | | self.StartIndex = 0
|
| | | self.QueryCnt = 0
|
| | | self.HaveSpace = 0
|
| | | self.IDLimitType = 0
|
| | | self.SearchLen = 0
|
| | | self.SearchMsg = ""
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 4
|
| | | length += 4
|
| | | length += 4
|
| | | length += 1
|
| | | length += 1
|
| | | length += 1
|
| | | length += 1
|
| | | length += len(self.SearchMsg)
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteDWORD(data, self.FuncMapID)
|
| | | data = CommFunc.WriteDWORD(data, self.FuncMapEx)
|
| | | data = CommFunc.WriteDWORD(data, self.StartIndex)
|
| | | data = CommFunc.WriteBYTE(data, self.QueryCnt)
|
| | | data = CommFunc.WriteBYTE(data, self.HaveSpace)
|
| | | data = CommFunc.WriteBYTE(data, self.IDLimitType)
|
| | | data = CommFunc.WriteBYTE(data, self.SearchLen)
|
| | | data = CommFunc.WriteString(data, self.SearchLen, self.SearchMsg)
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | FuncMapID:%d,
|
| | | FuncMapEx:%d,
|
| | | StartIndex:%d,
|
| | | QueryCnt:%d,
|
| | | HaveSpace:%d,
|
| | | IDLimitType:%d,
|
| | | SearchLen:%d,
|
| | | SearchMsg:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.FuncMapID,
|
| | | self.FuncMapEx,
|
| | | self.StartIndex,
|
| | | self.QueryCnt,
|
| | | self.HaveSpace,
|
| | | self.IDLimitType,
|
| | | self.SearchLen,
|
| | | self.SearchMsg
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMQueryFuncTeam=tagCMQueryFuncTeam()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMQueryFuncTeam.Head.Cmd,m_NAtagCMQueryFuncTeam.Head.SubCmd))] = m_NAtagCMQueryFuncTeam
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B9 24 查找玩家功能队伍 #tagCMQueryPlayerFuncTeam
|
| | |
|
| | | class tagCMQueryPlayerFuncTeam(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("FuncMapID", c_int), # 功能地图ID或自定义的活动功能ID
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Cmd = 0xB9
|
| | | self.SubCmd = 0x24
|
| | | 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 = 0xB9
|
| | | self.SubCmd = 0x24
|
| | | self.FuncMapID = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagCMQueryPlayerFuncTeam)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// B9 24 查找玩家功能队伍 //tagCMQueryPlayerFuncTeam:
|
| | | Cmd:%s,
|
| | | SubCmd:%s,
|
| | | FuncMapID:%d
|
| | | '''\
|
| | | %(
|
| | | self.Cmd,
|
| | | self.SubCmd,
|
| | | self.FuncMapID
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagCMQueryPlayerFuncTeam=tagCMQueryPlayerFuncTeam()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMQueryPlayerFuncTeam.Cmd,m_NAtagCMQueryPlayerFuncTeam.SubCmd))] = m_NAtagCMQueryPlayerFuncTeam
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # C1 22 跨服排位竞猜 #tagCMChampionshipGuess
|
| | |
|
| | | class tagCMChampionshipGuess(Structure):
|