From 887a4882a958e29923e58805bf552f3f13499693 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期二, 03 六月 2025 14:40:23 +0800 Subject: [PATCH] 16 卡牌服务端(删除部分不需要的GMT命令) --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py | 2858 +++++++++++++++++++++++++---------------------------------- 1 files changed, 1,225 insertions(+), 1,633 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py index 939ec1a..d2e2a50 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetPack.py @@ -2175,54 +2175,6 @@ #------------------------------------------------------ -# 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): @@ -3142,101 +3094,6 @@ 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 #------------------------------------------------------ @@ -5727,126 +5584,6 @@ #------------------------------------------------------ -# 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): @@ -6229,74 +5966,75 @@ #------------------------------------------------------ -# 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 #------------------------------------------------------ @@ -7049,162 +6787,6 @@ 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 #------------------------------------------------------ @@ -8051,101 +7633,6 @@ 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 #------------------------------------------------------ @@ -14125,6 +13612,70 @@ #------------------------------------------------------ +# A5 37 请求邮件操作 #tagCMRequestMail + +class tagCMRequestMail(Structure): + Head = tagHead() + GUID = "" #(char GUID[36])//邮件GUID,可传空,默认针对个人邮件的批量处理,如批量领取、批量删除已领邮件等;全服邮件暂时限制只能单封邮件处理 + ReqType = 0 #(BYTE ReqType)//0-设置已读,1-领取邮件,2-删除邮件 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA5 + self.Head.SubCmd = 0x37 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.GUID,_pos = CommFunc.ReadString(_lpData, _pos,36) + self.ReqType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA5 + self.Head.SubCmd = 0x37 + self.GUID = "" + self.ReqType = 0 + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 36 + length += 1 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteString(data, 36, self.GUID) + data = CommFunc.WriteBYTE(data, self.ReqType) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + GUID:%s, + ReqType:%d + '''\ + %( + self.Head.OutputString(), + self.GUID, + self.ReqType + ) + return DumpString + + +m_NAtagCMRequestMail=tagCMRequestMail() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMRequestMail.Head.Cmd,m_NAtagCMRequestMail.Head.SubCmd))] = m_NAtagCMRequestMail + + +#------------------------------------------------------ # A5 68 请求寻宝 #tagCMRequestTreasure class tagCMRequestTreasure(Structure): @@ -14555,54 +14106,6 @@ m_NAtagCMSelectSkillElement=tagCMSelectSkillElement() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMSelectSkillElement.Cmd,m_NAtagCMSelectSkillElement.SubCmd))] = m_NAtagCMSelectSkillElement - - -#------------------------------------------------------ -# A5 17 绑玉转盘开始 #tagCMStartBindJadeWheel - -class tagCMStartBindJadeWheel(Structure): - _pack_ = 1 - _fields_ = [ - ("Cmd", c_ubyte), - ("SubCmd", c_ubyte), - ] - - def __init__(self): - self.Clear() - self.Cmd = 0xA5 - 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 = 0xA5 - self.SubCmd = 0x17 - return - - def GetLength(self): - return sizeof(tagCMStartBindJadeWheel) - - def GetBuffer(self): - return string_at(addressof(self), self.GetLength()) - - def OutputString(self): - DumpString = '''// A5 17 绑玉转盘开始 //tagCMStartBindJadeWheel: - Cmd:%s, - SubCmd:%s - '''\ - %( - self.Cmd, - self.SubCmd - ) - return DumpString - - -m_NAtagCMStartBindJadeWheel=tagCMStartBindJadeWheel() -ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMStartBindJadeWheel.Cmd,m_NAtagCMStartBindJadeWheel.SubCmd))] = m_NAtagCMStartBindJadeWheel #------------------------------------------------------ @@ -15082,6 +14585,227 @@ #------------------------------------------------------ +# A6 23 修改家族公告 #tagCMChangeFamilyBroadcast + +class tagCMChangeFamilyBroadcast(Structure): + Head = tagHead() + Msg = "" #(char Msg[200]) + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA6 + self.Head.SubCmd = 0x23 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.Msg,_pos = CommFunc.ReadString(_lpData, _pos,200) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA6 + self.Head.SubCmd = 0x23 + self.Msg = "" + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 200 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteString(data, 200, self.Msg) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + Msg:%s + '''\ + %( + self.Head.OutputString(), + self.Msg + ) + return DumpString + + +m_NAtagCMChangeFamilyBroadcast=tagCMChangeFamilyBroadcast() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMChangeFamilyBroadcast.Head.Cmd,m_NAtagCMChangeFamilyBroadcast.Head.SubCmd))] = m_NAtagCMChangeFamilyBroadcast + + +#------------------------------------------------------ +# A6 24 修改家族徽章 #tagCMChangeFamilyEmblem + +class tagCMChangeFamilyEmblem(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("EmblemID", c_ubyte), # 更换的徽章ID + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xA6 + 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 = 0xA6 + self.SubCmd = 0x24 + self.EmblemID = 0 + return + + def GetLength(self): + return sizeof(tagCMChangeFamilyEmblem) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A6 24 修改家族徽章 //tagCMChangeFamilyEmblem: + Cmd:%s, + SubCmd:%s, + EmblemID:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.EmblemID + ) + return DumpString + + +m_NAtagCMChangeFamilyEmblem=tagCMChangeFamilyEmblem() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMChangeFamilyEmblem.Cmd,m_NAtagCMChangeFamilyEmblem.SubCmd))] = m_NAtagCMChangeFamilyEmblem + + +#------------------------------------------------------ +# A6 22 修改收人方式 #tagCMChangeFamilyJoin + +class tagCMChangeFamilyJoin(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("JoinReview", c_ubyte), #成员加入是否需要审核,默认0自动加入 + ("JoinLVMin", c_ushort), #限制最低可加入的玩家等级 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xA6 + 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 = 0xA6 + self.SubCmd = 0x22 + self.JoinReview = 0 + self.JoinLVMin = 0 + return + + def GetLength(self): + return sizeof(tagCMChangeFamilyJoin) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A6 22 修改收人方式 //tagCMChangeFamilyJoin: + Cmd:%s, + SubCmd:%s, + JoinReview:%d, + JoinLVMin:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.JoinReview, + self.JoinLVMin + ) + return DumpString + + +m_NAtagCMChangeFamilyJoin=tagCMChangeFamilyJoin() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMChangeFamilyJoin.Cmd,m_NAtagCMChangeFamilyJoin.SubCmd))] = m_NAtagCMChangeFamilyJoin + + +#------------------------------------------------------ +# A6 25 修改家族成员职位 #tagCMChangeFamilyMemLV + +class tagCMChangeFamilyMemLV(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("PlayerID", c_int), # 目标成员ID + ("FmLV", c_ubyte), # 变更为xx职位 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xA6 + self.SubCmd = 0x25 + 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 = 0x25 + self.PlayerID = 0 + self.FmLV = 0 + return + + def GetLength(self): + return sizeof(tagCMChangeFamilyMemLV) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A6 25 修改家族成员职位 //tagCMChangeFamilyMemLV: + Cmd:%s, + SubCmd:%s, + PlayerID:%d, + FmLV:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.PlayerID, + self.FmLV + ) + return DumpString + + +m_NAtagCMChangeFamilyMemLV=tagCMChangeFamilyMemLV() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMChangeFamilyMemLV.Cmd,m_NAtagCMChangeFamilyMemLV.SubCmd))] = m_NAtagCMChangeFamilyMemLV + + +#------------------------------------------------------ # A6 15 传功操作 #tagCMChuangongOP class tagCMChuangongOP(Structure): @@ -15210,6 +14934,122 @@ m_NAtagCMRenameFamily=tagCMRenameFamily() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMRenameFamily.Head.Cmd,m_NAtagCMRenameFamily.Head.SubCmd))] = m_NAtagCMRenameFamily + + +#------------------------------------------------------ +# A6 04 创建家族 #tagCMCreateFamily + +class tagCMCreateFamily(Structure): + Head = tagHead() + Name = "" #(char Name[33]) + EmblemID = 0 #(WORD EmblemID)//选择徽章ID,解锁仙盟等级为1级的均为可选ID + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA6 + self.Head.SubCmd = 0x04 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.Name,_pos = CommFunc.ReadString(_lpData, _pos,33) + self.EmblemID,_pos = CommFunc.ReadWORD(_lpData, _pos) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA6 + self.Head.SubCmd = 0x04 + self.Name = "" + self.EmblemID = 0 + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 33 + length += 2 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteString(data, 33, self.Name) + data = CommFunc.WriteWORD(data, self.EmblemID) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + Name:%s, + EmblemID:%d + '''\ + %( + self.Head.OutputString(), + self.Name, + self.EmblemID + ) + return DumpString + + +m_NAtagCMCreateFamily=tagCMCreateFamily() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMCreateFamily.Head.Cmd,m_NAtagCMCreateFamily.Head.SubCmd))] = m_NAtagCMCreateFamily + + +#------------------------------------------------------ +# A6 05 删除家族成员 #tagCMDeleteFamilyMember + +class tagCMDeleteFamilyMember(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("MemberID", c_int), + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xA6 + 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 = 0xA6 + self.SubCmd = 0x05 + self.MemberID = 0 + return + + def GetLength(self): + return sizeof(tagCMDeleteFamilyMember) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A6 05 删除家族成员 //tagCMDeleteFamilyMember: + Cmd:%s, + SubCmd:%s, + MemberID:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.MemberID + ) + return DumpString + + +m_NAtagCMDeleteFamilyMember=tagCMDeleteFamilyMember() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMDeleteFamilyMember.Cmd,m_NAtagCMDeleteFamilyMember.SubCmd))] = m_NAtagCMDeleteFamilyMember #------------------------------------------------------ @@ -15353,7 +15193,7 @@ _fields_ = [ ("Cmd", c_ubyte), ("SubCmd", c_ubyte), - ("MoneyType", c_ubyte), # 捐献货币类型 + ("DonateType", c_ubyte), # 捐献类型 ] def __init__(self): @@ -15370,7 +15210,7 @@ def Clear(self): self.Cmd = 0xA6 self.SubCmd = 0x12 - self.MoneyType = 0 + self.DonateType = 0 return def GetLength(self): @@ -15383,12 +15223,12 @@ DumpString = '''// A6 12 家族捐献货币 //tagCMFamilyMoneyDonate: Cmd:%s, SubCmd:%s, - MoneyType:%d + DonateType:%d '''\ %( self.Cmd, self.SubCmd, - self.MoneyType + self.DonateType ) return DumpString @@ -15570,15 +15410,223 @@ #------------------------------------------------------ -#A6 02 申请加入家族#tagCGRequesJoinFamily +# A6 26 请求家族成员列表 #tagCMGetFamilyInfo -class tagCGRequesJoinFamily(Structure): +class tagCMGetFamilyInfo(Structure): _pack_ = 1 _fields_ = [ ("Cmd", c_ubyte), ("SubCmd", c_ubyte), - ("Type", c_ubyte), #申请类型 - ("AddFamilyID", c_int), #申请加入的家族 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xA6 + self.SubCmd = 0x26 + 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 = 0x26 + return + + def GetLength(self): + return sizeof(tagCMGetFamilyInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A6 26 请求家族成员列表 //tagCMGetFamilyInfo: + Cmd:%s, + SubCmd:%s + '''\ + %( + self.Cmd, + self.SubCmd + ) + return DumpString + + +m_NAtagCMGetFamilyInfo=tagCMGetFamilyInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMGetFamilyInfo.Cmd,m_NAtagCMGetFamilyInfo.SubCmd))] = m_NAtagCMGetFamilyInfo + + +#------------------------------------------------------ +# A6 21 审核请求加入家族 #tagCMJoinFamilyReply + +class tagCMJoinFamilyReply(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("TagPlayerID", c_int), #被审核玩家ID 0则代表全部 + ("IsOK", c_ubyte), #是否同意其加入 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xA6 + 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 = 0xA6 + self.SubCmd = 0x21 + self.TagPlayerID = 0 + self.IsOK = 0 + return + + def GetLength(self): + return sizeof(tagCMJoinFamilyReply) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A6 21 审核请求加入家族 //tagCMJoinFamilyReply: + Cmd:%s, + SubCmd:%s, + TagPlayerID:%d, + IsOK:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.TagPlayerID, + self.IsOK + ) + return DumpString + + +m_NAtagCMJoinFamilyReply=tagCMJoinFamilyReply() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMJoinFamilyReply.Cmd,m_NAtagCMJoinFamilyReply.SubCmd))] = m_NAtagCMJoinFamilyReply + + +#------------------------------------------------------ +# A6 03 离开家族 #tagCMLeaveFamily + +class tagCMLeaveFamily(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xA6 + 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 = 0xA6 + self.SubCmd = 0x03 + return + + def GetLength(self): + return sizeof(tagCMLeaveFamily) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// A6 03 离开家族 //tagCMLeaveFamily: + Cmd:%s, + SubCmd:%s + '''\ + %( + self.Cmd, + self.SubCmd + ) + return DumpString + + +m_NAtagCMLeaveFamily=tagCMLeaveFamily() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMLeaveFamily.Cmd,m_NAtagCMLeaveFamily.SubCmd))] = m_NAtagCMLeaveFamily + + +#------------------------------------------------------ +# 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): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("Type", c_ubyte), #申请类型,0-申请;1-撤销 + ("TagFamilyID", c_int), #目标家族ID,申请时为0代表一键申请家族任意家族 ] def __init__(self): @@ -15596,44 +15644,44 @@ self.Cmd = 0xA6 self.SubCmd = 0x02 self.Type = 0 - self.AddFamilyID = 0 + self.TagFamilyID = 0 return def GetLength(self): - return sizeof(tagCGRequesJoinFamily) + return sizeof(tagCMRequesJoinFamily) def GetBuffer(self): return string_at(addressof(self), self.GetLength()) def OutputString(self): - DumpString = '''//A6 02 申请加入家族//tagCGRequesJoinFamily: + DumpString = '''// A6 02 申请加入家族//tagCMRequesJoinFamily: Cmd:%s, SubCmd:%s, Type:%d, - AddFamilyID:%d + TagFamilyID:%d '''\ %( self.Cmd, self.SubCmd, self.Type, - self.AddFamilyID + self.TagFamilyID ) return DumpString -m_NAtagCGRequesJoinFamily=tagCGRequesJoinFamily() -ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCGRequesJoinFamily.Cmd,m_NAtagCGRequesJoinFamily.SubCmd))] = m_NAtagCGRequesJoinFamily +m_NAtagCMRequesJoinFamily=tagCMRequesJoinFamily() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMRequesJoinFamily.Cmd,m_NAtagCMRequesJoinFamily.SubCmd))] = m_NAtagCMRequesJoinFamily #------------------------------------------------------ -#A6 01 向玩家申请加入家族 #tagCGRequestJoinFamilyByPlayer +# A6 01 向玩家申请加入家族 #tagCMRequestJoinFamilyByPlayer -class tagCGRequestJoinFamilyByPlayer(Structure): +class tagCMRequestJoinFamilyByPlayer(Structure): _pack_ = 1 _fields_ = [ ("Cmd", c_ubyte), ("SubCmd", c_ubyte), - ("AddPlayerID", c_int), #申请加入的玩家ID + ("TagPlayerID", c_int), #目标家族玩家ID ] def __init__(self): @@ -15650,31 +15698,31 @@ def Clear(self): self.Cmd = 0xA6 self.SubCmd = 0x01 - self.AddPlayerID = 0 + self.TagPlayerID = 0 return def GetLength(self): - return sizeof(tagCGRequestJoinFamilyByPlayer) + return sizeof(tagCMRequestJoinFamilyByPlayer) def GetBuffer(self): return string_at(addressof(self), self.GetLength()) def OutputString(self): - DumpString = '''//A6 01 向玩家申请加入家族 //tagCGRequestJoinFamilyByPlayer: + DumpString = '''// A6 01 向玩家申请加入家族 //tagCMRequestJoinFamilyByPlayer: Cmd:%s, SubCmd:%s, - AddPlayerID:%d + TagPlayerID:%d '''\ %( self.Cmd, self.SubCmd, - self.AddPlayerID + self.TagPlayerID ) return DumpString -m_NAtagCGRequestJoinFamilyByPlayer=tagCGRequestJoinFamilyByPlayer() -ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCGRequestJoinFamilyByPlayer.Cmd,m_NAtagCGRequestJoinFamilyByPlayer.SubCmd))] = m_NAtagCGRequestJoinFamilyByPlayer +m_NAtagCMRequestJoinFamilyByPlayer=tagCMRequestJoinFamilyByPlayer() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMRequestJoinFamilyByPlayer.Cmd,m_NAtagCMRequestJoinFamilyByPlayer.SubCmd))] = m_NAtagCMRequestJoinFamilyByPlayer #------------------------------------------------------ @@ -15812,6 +15860,84 @@ m_NAtagCMFamilyTechLVUP=tagCMFamilyTechLVUP() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMFamilyTechLVUP.Cmd,m_NAtagCMFamilyTechLVUP.SubCmd))] = m_NAtagCMFamilyTechLVUP + + +#------------------------------------------------------ +# A6 20 搜索家族列表 #tagCMViewFamilyPage + +class tagCMViewFamilyPage(Structure): + Head = tagHead() + MsgLen = 0 #(BYTE MsgLen)//模糊搜索家族,如果输入为空,则为不限制该条件 + Msg = "" #(String Msg)//size = MsgLen + PageIndex = 0 #(BYTE PageIndex)//查询第X页索引,0~n + ShowCount = 0 #(BYTE ShowCount)//每页数量,前端可自行指定,最大50 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA6 + self.Head.SubCmd = 0x20 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.MsgLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.Msg,_pos = CommFunc.ReadString(_lpData, _pos,self.MsgLen) + self.PageIndex,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.ShowCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA6 + self.Head.SubCmd = 0x20 + self.MsgLen = 0 + self.Msg = "" + self.PageIndex = 0 + self.ShowCount = 0 + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += len(self.Msg) + length += 1 + length += 1 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.MsgLen) + data = CommFunc.WriteString(data, self.MsgLen, self.Msg) + data = CommFunc.WriteBYTE(data, self.PageIndex) + data = CommFunc.WriteBYTE(data, self.ShowCount) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + MsgLen:%d, + Msg:%s, + PageIndex:%d, + ShowCount:%d + '''\ + %( + self.Head.OutputString(), + self.MsgLen, + self.Msg, + self.PageIndex, + self.ShowCount + ) + return DumpString + + +m_NAtagCMViewFamilyPage=tagCMViewFamilyPage() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMViewFamilyPage.Head.Cmd,m_NAtagCMViewFamilyPage.Head.SubCmd))] = m_NAtagCMViewFamilyPage #------------------------------------------------------ @@ -17656,54 +17782,6 @@ #------------------------------------------------------ -# AB 0B 购买天神经验 #tagCMBuySkyGodExp - -class tagCMBuySkyGodExp(Structure): - _pack_ = 1 - _fields_ = [ - ("Cmd", c_ubyte), - ("SubCmd", c_ubyte), - ] - - def __init__(self): - self.Clear() - self.Cmd = 0xAB - self.SubCmd = 0x0B - 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 = 0xAB - self.SubCmd = 0x0B - return - - def GetLength(self): - return sizeof(tagCMBuySkyGodExp) - - def GetBuffer(self): - return string_at(addressof(self), self.GetLength()) - - def OutputString(self): - DumpString = '''// AB 0B 购买天神经验 //tagCMBuySkyGodExp: - Cmd:%s, - SubCmd:%s - '''\ - %( - self.Cmd, - self.SubCmd - ) - return DumpString - - -m_NAtagCMBuySkyGodExp=tagCMBuySkyGodExp() -ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMBuySkyGodExp.Cmd,m_NAtagCMBuySkyGodExp.SubCmd))] = m_NAtagCMBuySkyGodExp - - -#------------------------------------------------------ # AB 12 抢红包 #tagCMGrabFamilyRedPacket class tagCMGrabFamilyRedPacket(Structure): @@ -17816,58 +17894,6 @@ #------------------------------------------------------ -# AB 0A 骰子投掷 #tagCMDiceTake - -class tagCMDiceTake(Structure): - _pack_ = 1 - _fields_ = [ - ("Cmd", c_ubyte), - ("SubCmd", c_ubyte), - ("IsAutoBuy", c_ubyte), # 是否自动购买 0-否 1-是 - ] - - def __init__(self): - self.Clear() - self.Cmd = 0xAB - 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 = 0xAB - self.SubCmd = 0x0A - self.IsAutoBuy = 0 - return - - def GetLength(self): - return sizeof(tagCMDiceTake) - - def GetBuffer(self): - return string_at(addressof(self), self.GetLength()) - - def OutputString(self): - DumpString = '''// AB 0A 骰子投掷 //tagCMDiceTake: - Cmd:%s, - SubCmd:%s, - IsAutoBuy:%d - '''\ - %( - self.Cmd, - self.SubCmd, - self.IsAutoBuy - ) - return DumpString - - -m_NAtagCMDiceTake=tagCMDiceTake() -ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMDiceTake.Cmd,m_NAtagCMDiceTake.SubCmd))] = m_NAtagCMDiceTake - - -#------------------------------------------------------ # AB 11 开服活动奖励 #tagCMOpenServerCampaignAward class tagCMOpenServerCampaignAward(Structure): @@ -17925,370 +17951,6 @@ m_NAtagCMOpenServerCampaignAward=tagCMOpenServerCampaignAward() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMOpenServerCampaignAward.Cmd,m_NAtagCMOpenServerCampaignAward.SubCmd))] = m_NAtagCMOpenServerCampaignAward - - -#------------------------------------------------------ -# AB 0C 摇骰子 #tagCMDiceEx - -class tagCMDiceEx(Structure): - _pack_ = 1 - _fields_ = [ - ("Cmd", c_ubyte), - ("SubCmd", c_ubyte), - ("Type", c_ubyte), # 0-投骰子 1-改投 2-见好就收 - ] - - def __init__(self): - self.Clear() - self.Cmd = 0xAB - self.SubCmd = 0x0C - 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 = 0xAB - self.SubCmd = 0x0C - self.Type = 0 - return - - def GetLength(self): - return sizeof(tagCMDiceEx) - - def GetBuffer(self): - return string_at(addressof(self), self.GetLength()) - - def OutputString(self): - DumpString = '''// AB 0C 摇骰子 //tagCMDiceEx: - Cmd:%s, - SubCmd:%s, - Type:%d - '''\ - %( - self.Cmd, - self.SubCmd, - self.Type - ) - return DumpString - - -m_NAtagCMDiceEx=tagCMDiceEx() -ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMDiceEx.Cmd,m_NAtagCMDiceEx.SubCmd))] = m_NAtagCMDiceEx - - -#------------------------------------------------------ -# 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 #------------------------------------------------------ @@ -20554,20 +20216,20 @@ #------------------------------------------------------ -#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): @@ -20577,120 +20239,50 @@ 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): @@ -20700,140 +20292,35 @@ 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 #------------------------------------------------------ @@ -21218,6 +20705,74 @@ 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 + #------------------------------------------------------ @@ -22114,54 +21669,6 @@ #------------------------------------------------------ -#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): @@ -22456,234 +21963,26 @@ #------------------------------------------------------ -# B5 14 拍卖行竞价物品 #tagCMBiddingAuctionItem +# B9 21 修改功能队伍 #tagCMChangeFuncTeam -class tagCMBiddingAuctionItem(Structure): - Head = tagHead() - ItemGUID = "" #(char ItemGUID[40]) - BiddingPrice = 0 #(DWORD BiddingPrice)//竞价价格 - data = None - - def __init__(self): - self.Clear() - self.Head.Cmd = 0xB5 - self.Head.SubCmd = 0x14 - return - - def ReadData(self, _lpData, _pos=0, _Len=0): - self.Clear() - _pos = self.Head.ReadData(_lpData, _pos) - self.ItemGUID,_pos = CommFunc.ReadString(_lpData, _pos,40) - self.BiddingPrice,_pos = CommFunc.ReadDWORD(_lpData, _pos) - return _pos - - def Clear(self): - self.Head = tagHead() - self.Head.Clear() - self.Head.Cmd = 0xB5 - self.Head.SubCmd = 0x14 - self.ItemGUID = "" - self.BiddingPrice = 0 - return - - def GetLength(self): - length = 0 - length += self.Head.GetLength() - length += 40 - length += 4 - - return length - - def GetBuffer(self): - data = '' - data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) - data = CommFunc.WriteString(data, 40, self.ItemGUID) - data = CommFunc.WriteDWORD(data, self.BiddingPrice) - return data - - def OutputString(self): - DumpString = ''' - Head:%s, - ItemGUID:%s, - BiddingPrice:%d - '''\ - %( - self.Head.OutputString(), - self.ItemGUID, - self.BiddingPrice - ) - return DumpString - - -m_NAtagCMBiddingAuctionItem=tagCMBiddingAuctionItem() -ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMBiddingAuctionItem.Head.Cmd,m_NAtagCMBiddingAuctionItem.Head.SubCmd))] = m_NAtagCMBiddingAuctionItem - - -#------------------------------------------------------ -# B5 02 交易所购买物品#tagCMPYBuyBourseItem - -class tagCMPYBuyBourseItem(Structure): - Head = tagHead() - ItemGUID = "" #(char ItemGUID[40]) - Pwd = "" #(char Pwd[8])//交易密码 - data = None - - def __init__(self): - self.Clear() - self.Head.Cmd = 0xB5 - self.Head.SubCmd = 0x02 - return - - def ReadData(self, _lpData, _pos=0, _Len=0): - self.Clear() - _pos = self.Head.ReadData(_lpData, _pos) - self.ItemGUID,_pos = CommFunc.ReadString(_lpData, _pos,40) - self.Pwd,_pos = CommFunc.ReadString(_lpData, _pos,8) - return _pos - - def Clear(self): - self.Head = tagHead() - self.Head.Clear() - self.Head.Cmd = 0xB5 - self.Head.SubCmd = 0x02 - self.ItemGUID = "" - self.Pwd = "" - return - - def GetLength(self): - length = 0 - length += self.Head.GetLength() - length += 40 - length += 8 - - return length - - def GetBuffer(self): - data = '' - data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) - data = CommFunc.WriteString(data, 40, self.ItemGUID) - data = CommFunc.WriteString(data, 8, self.Pwd) - return data - - def OutputString(self): - DumpString = ''' - Head:%s, - ItemGUID:%s, - Pwd:%s - '''\ - %( - self.Head.OutputString(), - self.ItemGUID, - self.Pwd - ) - return DumpString - - -m_NAtagCMPYBuyBourseItem=tagCMPYBuyBourseItem() -ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMPYBuyBourseItem.Head.Cmd,m_NAtagCMPYBuyBourseItem.Head.SubCmd))] = m_NAtagCMPYBuyBourseItem - - -#------------------------------------------------------ -# B5 01 交易所玩家上架物品#tagCMPYPlayerSellBourseItem - -class tagCMPYPlayerSellBourseItem(Structure): - Head = tagHead() - ItemIndex = 0 #(BYTE ItemIndex)//物品在背包中索引 - Count = 0 #(WORD Count)//出售数量 - PriceType = 0 #(BYTE PriceType)//出售价格类型 - PriceCount = 0 #(DWORD PriceCount)//出售价格 - Pwd = "" #(char Pwd[8])//交易密码 - data = None - - def __init__(self): - self.Clear() - self.Head.Cmd = 0xB5 - self.Head.SubCmd = 0x01 - return - - def ReadData(self, _lpData, _pos=0, _Len=0): - self.Clear() - _pos = self.Head.ReadData(_lpData, _pos) - self.ItemIndex,_pos = CommFunc.ReadBYTE(_lpData, _pos) - self.Count,_pos = CommFunc.ReadWORD(_lpData, _pos) - self.PriceType,_pos = CommFunc.ReadBYTE(_lpData, _pos) - self.PriceCount,_pos = CommFunc.ReadDWORD(_lpData, _pos) - self.Pwd,_pos = CommFunc.ReadString(_lpData, _pos,8) - return _pos - - def Clear(self): - self.Head = tagHead() - self.Head.Clear() - self.Head.Cmd = 0xB5 - self.Head.SubCmd = 0x01 - self.ItemIndex = 0 - self.Count = 0 - self.PriceType = 0 - self.PriceCount = 0 - self.Pwd = "" - return - - def GetLength(self): - length = 0 - length += self.Head.GetLength() - length += 1 - length += 2 - length += 1 - length += 4 - length += 8 - - return length - - def GetBuffer(self): - data = '' - data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) - data = CommFunc.WriteBYTE(data, self.ItemIndex) - data = CommFunc.WriteWORD(data, self.Count) - data = CommFunc.WriteBYTE(data, self.PriceType) - data = CommFunc.WriteDWORD(data, self.PriceCount) - data = CommFunc.WriteString(data, 8, self.Pwd) - return data - - def OutputString(self): - DumpString = ''' - Head:%s, - ItemIndex:%d, - Count:%d, - PriceType:%d, - PriceCount:%d, - Pwd:%s - '''\ - %( - self.Head.OutputString(), - self.ItemIndex, - self.Count, - self.PriceType, - self.PriceCount, - self.Pwd - ) - return DumpString - - -m_NAtagCMPYPlayerSellBourseItem=tagCMPYPlayerSellBourseItem() -ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMPYPlayerSellBourseItem.Head.Cmd,m_NAtagCMPYPlayerSellBourseItem.Head.SubCmd))] = m_NAtagCMPYPlayerSellBourseItem - - -#------------------------------------------------------ -# B5 13 拍卖行上架拍品 #tagCMSellAuctionItem - -class tagCMSellAuctionItem(Structure): +class tagCMChangeFuncTeam(Structure): _pack_ = 1 _fields_ = [ ("Cmd", c_ubyte), ("SubCmd", c_ubyte), - ("ItemIndex", c_ubyte), #物品在背包中索引 - ("SellCount", c_ushort), #上架个数,0代表全部上架 + ("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 = 0xB5 - self.SubCmd = 0x13 + self.Cmd = 0xB9 + self.SubCmd = 0x21 return def ReadData(self, stringData, _pos=0, _len=0): @@ -22692,93 +21991,51 @@ return _pos + self.GetLength() def Clear(self): - self.Cmd = 0xB5 - self.SubCmd = 0x13 - self.ItemIndex = 0 - self.SellCount = 0 + 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(tagCMSellAuctionItem) + return sizeof(tagCMChangeFuncTeam) def GetBuffer(self): return string_at(addressof(self), self.GetLength()) def OutputString(self): - DumpString = '''// B5 13 拍卖行上架拍品 //tagCMSellAuctionItem: + DumpString = '''// B9 21 修改功能队伍 //tagCMChangeFuncTeam: Cmd:%s, SubCmd:%s, - ItemIndex:%d, - SellCount:%d + TeamID:%d, + FuncMapID:%d, + MinLV:%d, + MinFightPower:%d, + MinFightPowerEx:%d, + ServerOnly:%d, + NeedCheck:%d '''\ %( self.Cmd, self.SubCmd, - self.ItemIndex, - self.SellCount + self.TeamID, + self.FuncMapID, + self.MinLV, + self.MinFightPower, + self.MinFightPowerEx, + self.ServerOnly, + self.NeedCheck ) return DumpString -m_NAtagCMSellAuctionItem=tagCMSellAuctionItem() -ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMSellAuctionItem.Cmd,m_NAtagCMSellAuctionItem.SubCmd))] = m_NAtagCMSellAuctionItem - - -#------------------------------------------------------ -# B5 15 拍卖行下架拍品 #tagCMUnsellAuctionItem - -class tagCMUnsellAuctionItem(Structure): - Head = tagHead() - ItemGUID = "" #(char ItemGUID[40]) - data = None - - def __init__(self): - self.Clear() - self.Head.Cmd = 0xB5 - self.Head.SubCmd = 0x15 - return - - def ReadData(self, _lpData, _pos=0, _Len=0): - self.Clear() - _pos = self.Head.ReadData(_lpData, _pos) - self.ItemGUID,_pos = CommFunc.ReadString(_lpData, _pos,40) - return _pos - - def Clear(self): - self.Head = tagHead() - self.Head.Clear() - self.Head.Cmd = 0xB5 - self.Head.SubCmd = 0x15 - self.ItemGUID = "" - return - - def GetLength(self): - length = 0 - length += self.Head.GetLength() - length += 40 - - return length - - def GetBuffer(self): - data = '' - data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) - data = CommFunc.WriteString(data, 40, self.ItemGUID) - return data - - def OutputString(self): - DumpString = ''' - Head:%s, - ItemGUID:%s - '''\ - %( - self.Head.OutputString(), - self.ItemGUID - ) - return DumpString - - -m_NAtagCMUnsellAuctionItem=tagCMUnsellAuctionItem() -ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMUnsellAuctionItem.Head.Cmd,m_NAtagCMUnsellAuctionItem.Head.SubCmd))] = m_NAtagCMUnsellAuctionItem +m_NAtagCMChangeFuncTeam=tagCMChangeFuncTeam() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagCMChangeFuncTeam.Cmd,m_NAtagCMChangeFuncTeam.SubCmd))] = m_NAtagCMChangeFuncTeam #------------------------------------------------------ @@ -22838,6 +22095,341 @@ #------------------------------------------------------ +# 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): -- Gitblit v1.8.0