From abe6fdab99df2e4200a59a6b6c46f6de913632b8 Mon Sep 17 00:00:00 2001 From: xdh <xiefantasy@qq.com> Date: 星期五, 22 二月 2019 10:28:26 +0800 Subject: [PATCH] 3023 【1.6】【2.0】七日巡礼道具使用无效 --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py | 2122 ++++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 1,962 insertions(+), 160 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py index 90a694f..5f86b1a 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChPyNetSendPack.py @@ -4715,6 +4715,151 @@ #------------------------------------------------------ +# AC 11 节日红包活动信息 #tagGCFeastRedPacketInfo + +class tagGCFeastRedPacketDay(Structure): + RedPacketCount = 0 #(BYTE RedPacketCount) + RedPacketIDList = list() #(vector<WORD> RedPacketIDList)// 当日定时发放的系统红包表ID列表 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.RedPacketCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.RedPacketCount): + value,_pos=CommFunc.ReadWORD(_lpData,_pos) + self.RedPacketIDList.append(value) + return _pos + + def Clear(self): + self.RedPacketCount = 0 + self.RedPacketIDList = list() + return + + def GetLength(self): + length = 0 + length += 1 + length += 2 * self.RedPacketCount + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteBYTE(data, self.RedPacketCount) + for i in range(self.RedPacketCount): + data = CommFunc.WriteWORD(data, self.RedPacketIDList[i]) + return data + + def OutputString(self): + DumpString = ''' + RedPacketCount:%d, + RedPacketIDList:%s + '''\ + %( + self.RedPacketCount, + "..." + ) + return DumpString + + +class tagGCFeastRedPacketInfo(Structure): + Head = tagHead() + StartDate = "" #(char StartDate[10])// 开始日期 y-m-d + EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d + LimitLV = 0 #(WORD LimitLV)// 限制等级 + ResetType = 0 #(BYTE ResetType)// 重置类型 0-0点重置 1-5点重置 + RedPacketDays = 0 #(BYTE RedPacketDays) + RedPacketDayList = list() #(vector<tagGCFeastRedPacketDay> RedPacketDayList)// 每日系统红包信息 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAC + self.Head.SubCmd = 0x11 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.ResetType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.RedPacketDays,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.RedPacketDays): + temRedPacketDayList = tagGCFeastRedPacketDay() + _pos = temRedPacketDayList.ReadData(_lpData, _pos) + self.RedPacketDayList.append(temRedPacketDayList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAC + self.Head.SubCmd = 0x11 + self.StartDate = "" + self.EndtDate = "" + self.LimitLV = 0 + self.ResetType = 0 + self.RedPacketDays = 0 + self.RedPacketDayList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 10 + length += 10 + length += 2 + length += 1 + length += 1 + for i in range(self.RedPacketDays): + length += self.RedPacketDayList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteString(data, 10, self.StartDate) + data = CommFunc.WriteString(data, 10, self.EndtDate) + data = CommFunc.WriteWORD(data, self.LimitLV) + data = CommFunc.WriteBYTE(data, self.ResetType) + data = CommFunc.WriteBYTE(data, self.RedPacketDays) + for i in range(self.RedPacketDays): + data = CommFunc.WriteString(data, self.RedPacketDayList[i].GetLength(), self.RedPacketDayList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + StartDate:%s, + EndtDate:%s, + LimitLV:%d, + ResetType:%d, + RedPacketDays:%d, + RedPacketDayList:%s + '''\ + %( + self.Head.OutputString(), + self.StartDate, + self.EndtDate, + self.LimitLV, + self.ResetType, + self.RedPacketDays, + "..." + ) + return DumpString + + +m_NAtagGCFeastRedPacketInfo=tagGCFeastRedPacketInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCFeastRedPacketInfo.Head.Cmd,m_NAtagGCFeastRedPacketInfo.Head.SubCmd))] = m_NAtagGCFeastRedPacketInfo + + +#------------------------------------------------------ # AC 02 通知仙魔之争信息 #tagGCXMZZInfo class tagGCXMZZInfo(Structure): @@ -5291,6 +5436,91 @@ m_NAtagGCMultiRealmPointInfo=tagGCMultiRealmPointInfo() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCMultiRealmPointInfo.Head.Cmd,m_NAtagGCMultiRealmPointInfo.Head.SubCmd))] = m_NAtagGCMultiRealmPointInfo + + +#------------------------------------------------------ +# AC 0B 新仙界盛典活动信息 #tagGCNewFairyCeremonyInfo + +class tagGCNewFairyCeremonyInfo(Structure): + Head = tagHead() + StartDate = "" #(char StartDate[10])// 开始日期 y-m-d + EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d + WorldLV = 0 #(WORD WorldLV)// 世界等级 + LimitLV = 0 #(WORD LimitLV)// 限制等级 + ResetType = 0 #(BYTE ResetType)// 重置类型 0-0点重置 1-5点重置 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAC + self.Head.SubCmd = 0x0B + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.WorldLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.ResetType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAC + self.Head.SubCmd = 0x0B + self.StartDate = "" + self.EndtDate = "" + self.WorldLV = 0 + self.LimitLV = 0 + self.ResetType = 0 + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 10 + length += 10 + length += 2 + length += 2 + length += 1 + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteString(data, 10, self.StartDate) + data = CommFunc.WriteString(data, 10, self.EndtDate) + data = CommFunc.WriteWORD(data, self.WorldLV) + data = CommFunc.WriteWORD(data, self.LimitLV) + data = CommFunc.WriteBYTE(data, self.ResetType) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + StartDate:%s, + EndtDate:%s, + WorldLV:%d, + LimitLV:%d, + ResetType:%d + '''\ + %( + self.Head.OutputString(), + self.StartDate, + self.EndtDate, + self.WorldLV, + self.LimitLV, + self.ResetType + ) + return DumpString + + +m_NAtagGCNewFairyCeremonyInfo=tagGCNewFairyCeremonyInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCNewFairyCeremonyInfo.Head.Cmd,m_NAtagGCNewFairyCeremonyInfo.Head.SubCmd))] = m_NAtagGCNewFairyCeremonyInfo #------------------------------------------------------ @@ -6616,6 +6846,626 @@ m_NAtagGCVoiceChat=tagGCVoiceChat() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCVoiceChat.Head.Cmd,m_NAtagGCVoiceChat.Head.SubCmd))] = m_NAtagGCVoiceChat + + +#------------------------------------------------------ +# B5 04 拍卖行新上架拍品 #tagGCAddAuctionItem + +class tagGCAddAuctionItem(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("ItemID", c_int), + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xB5 + 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 = 0xB5 + self.SubCmd = 0x04 + self.ItemID = 0 + return + + def GetLength(self): + return sizeof(tagGCAddAuctionItem) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// B5 04 拍卖行新上架拍品 //tagGCAddAuctionItem: + Cmd:%s, + SubCmd:%s, + ItemID:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.ItemID + ) + return DumpString + + +m_NAtagGCAddAuctionItem=tagGCAddAuctionItem() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCAddAuctionItem.Cmd,m_NAtagGCAddAuctionItem.SubCmd))] = m_NAtagGCAddAuctionItem + + +#------------------------------------------------------ +# B5 01 拍卖行拍卖中的物品信息 #tagGCAuctionItemInfo + +class tagGCAuctionItem(Structure): + ItemGUID = "" #(char ItemGUID[40]) + FamilyID = 0 #(DWORD FamilyID)//有值时为仙盟拍品 + ItemID = 0 #(DWORD ItemID) + ItemCount = 0 #(WORD ItemCount) + AddTime = "" #(char AddTime[19])//上架时间 yyyy-MM-dd hh:mm:ss + BidderPrice = 0 #(WORD BidderPrice)//竞拍玩家出价 + UserDataLen = 0 #(WORD UserDataLen) + UserData = "" #(String UserData)//自定义数据 + FamilyPlayerCount = 0 #(BYTE FamilyPlayerCount) + FamilyPlayerIDList = list() #(vector<DWORD> FamilyPlayerIDList)//享受收益的仙盟玩家ID列表 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.ItemGUID,_pos = CommFunc.ReadString(_lpData, _pos,40) + self.FamilyID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ItemID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ItemCount,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.AddTime,_pos = CommFunc.ReadString(_lpData, _pos,19) + self.BidderPrice,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.UserDataLen,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.UserData,_pos = CommFunc.ReadString(_lpData, _pos,self.UserDataLen) + self.FamilyPlayerCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.FamilyPlayerCount): + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) + self.FamilyPlayerIDList.append(value) + return _pos + + def Clear(self): + self.ItemGUID = "" + self.FamilyID = 0 + self.ItemID = 0 + self.ItemCount = 0 + self.AddTime = "" + self.BidderPrice = 0 + self.UserDataLen = 0 + self.UserData = "" + self.FamilyPlayerCount = 0 + self.FamilyPlayerIDList = list() + return + + def GetLength(self): + length = 0 + length += 40 + length += 4 + length += 4 + length += 2 + length += 19 + length += 2 + length += 2 + length += len(self.UserData) + length += 1 + length += 4 * self.FamilyPlayerCount + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, 40, self.ItemGUID) + data = CommFunc.WriteDWORD(data, self.FamilyID) + data = CommFunc.WriteDWORD(data, self.ItemID) + data = CommFunc.WriteWORD(data, self.ItemCount) + data = CommFunc.WriteString(data, 19, self.AddTime) + data = CommFunc.WriteWORD(data, self.BidderPrice) + data = CommFunc.WriteWORD(data, self.UserDataLen) + data = CommFunc.WriteString(data, self.UserDataLen, self.UserData) + data = CommFunc.WriteBYTE(data, self.FamilyPlayerCount) + for i in range(self.FamilyPlayerCount): + data = CommFunc.WriteDWORD(data, self.FamilyPlayerIDList[i]) + return data + + def OutputString(self): + DumpString = ''' + ItemGUID:%s, + FamilyID:%d, + ItemID:%d, + ItemCount:%d, + AddTime:%s, + BidderPrice:%d, + UserDataLen:%d, + UserData:%s, + FamilyPlayerCount:%d, + FamilyPlayerIDList:%s + '''\ + %( + self.ItemGUID, + self.FamilyID, + self.ItemID, + self.ItemCount, + self.AddTime, + self.BidderPrice, + self.UserDataLen, + self.UserData, + self.FamilyPlayerCount, + "..." + ) + return DumpString + + +class tagGCAuctionItemInfo(Structure): + Head = tagHead() + Job = 0 #(BYTE Job)//过滤职业,0为不限制 + ItemType = 0 #(BYTE ItemType)//过滤类型,0为不限制 + ClassLV = 0 #(BYTE ClassLV)//过滤阶数,0为不限制 + SpecItemIDCount = 0 #(BYTE SpecItemIDCount)//指定物品ID个数 + SpecItemIDList = list() #(vector<DWORD> SpecItemIDList)//指定物品ID + FromNum = 0 #(WORD FromNum)//查询起始数 (从1开始) + QueryCount = 0 #(BYTE QueryCount)//查询个数,0为全部 + IsFamily = 0 #(BYTE IsFamily)//是否查询仙盟拍品 + QueryTotalCount = 0 #(WORD QueryTotalCount)//查询条件实际总个数 + AuctionItemCount = 0 #(WORD AuctionItemCount)//返回拍品数量 + AuctionItemList = list() #(vector<tagGCAuctionItem> AuctionItemList)//返回拍品列表 + 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.Job,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.ItemType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.ClassLV,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.SpecItemIDCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.SpecItemIDCount): + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) + self.SpecItemIDList.append(value) + self.FromNum,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.QueryCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.IsFamily,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.QueryTotalCount,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.AuctionItemCount,_pos = CommFunc.ReadWORD(_lpData, _pos) + for i in range(self.AuctionItemCount): + temAuctionItemList = tagGCAuctionItem() + _pos = temAuctionItemList.ReadData(_lpData, _pos) + self.AuctionItemList.append(temAuctionItemList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB5 + self.Head.SubCmd = 0x01 + self.Job = 0 + self.ItemType = 0 + self.ClassLV = 0 + self.SpecItemIDCount = 0 + self.SpecItemIDList = list() + self.FromNum = 0 + self.QueryCount = 0 + self.IsFamily = 0 + self.QueryTotalCount = 0 + self.AuctionItemCount = 0 + self.AuctionItemList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + length += 1 + length += 1 + length += 1 + length += 4 * self.SpecItemIDCount + length += 2 + length += 1 + length += 1 + length += 2 + length += 2 + for i in range(self.AuctionItemCount): + length += self.AuctionItemList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.Job) + data = CommFunc.WriteBYTE(data, self.ItemType) + data = CommFunc.WriteBYTE(data, self.ClassLV) + data = CommFunc.WriteBYTE(data, self.SpecItemIDCount) + for i in range(self.SpecItemIDCount): + data = CommFunc.WriteDWORD(data, self.SpecItemIDList[i]) + data = CommFunc.WriteWORD(data, self.FromNum) + data = CommFunc.WriteBYTE(data, self.QueryCount) + data = CommFunc.WriteBYTE(data, self.IsFamily) + data = CommFunc.WriteWORD(data, self.QueryTotalCount) + data = CommFunc.WriteWORD(data, self.AuctionItemCount) + for i in range(self.AuctionItemCount): + data = CommFunc.WriteString(data, self.AuctionItemList[i].GetLength(), self.AuctionItemList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + Job:%d, + ItemType:%d, + ClassLV:%d, + SpecItemIDCount:%d, + SpecItemIDList:%s, + FromNum:%d, + QueryCount:%d, + IsFamily:%d, + QueryTotalCount:%d, + AuctionItemCount:%d, + AuctionItemList:%s + '''\ + %( + self.Head.OutputString(), + self.Job, + self.ItemType, + self.ClassLV, + self.SpecItemIDCount, + "...", + self.FromNum, + self.QueryCount, + self.IsFamily, + self.QueryTotalCount, + self.AuctionItemCount, + "..." + ) + return DumpString + + +m_NAtagGCAuctionItemInfo=tagGCAuctionItemInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCAuctionItemInfo.Head.Cmd,m_NAtagGCAuctionItemInfo.Head.SubCmd))] = m_NAtagGCAuctionItemInfo + + +#------------------------------------------------------ +# B5 02 拍卖行玩家拍卖中的物品信息 #tagGCPlayerAuctionItemInfo + +class tagGCPlayerAuctionItem(Structure): + ItemGUID = "" #(char ItemGUID[40]) + FamilyID = 0 #(DWORD FamilyID)//有值时为仙盟拍品 + ItemID = 0 #(DWORD ItemID) + ItemCount = 0 #(WORD ItemCount) + AddTime = "" #(char AddTime[19])//上架时间 yyyy-MM-dd hh:mm:ss + BidderPrice = 0 #(WORD BidderPrice)//竞拍玩家出价 + UserDataLen = 0 #(WORD UserDataLen) + UserData = "" #(String UserData)//自定义数据 + FamilyPlayerCount = 0 #(BYTE FamilyPlayerCount) + FamilyPlayerIDList = list() #(vector<DWORD> FamilyPlayerIDList)//享受收益的仙盟玩家ID列表 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.ItemGUID,_pos = CommFunc.ReadString(_lpData, _pos,40) + self.FamilyID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ItemID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ItemCount,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.AddTime,_pos = CommFunc.ReadString(_lpData, _pos,19) + self.BidderPrice,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.UserDataLen,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.UserData,_pos = CommFunc.ReadString(_lpData, _pos,self.UserDataLen) + self.FamilyPlayerCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.FamilyPlayerCount): + value,_pos=CommFunc.ReadDWORD(_lpData,_pos) + self.FamilyPlayerIDList.append(value) + return _pos + + def Clear(self): + self.ItemGUID = "" + self.FamilyID = 0 + self.ItemID = 0 + self.ItemCount = 0 + self.AddTime = "" + self.BidderPrice = 0 + self.UserDataLen = 0 + self.UserData = "" + self.FamilyPlayerCount = 0 + self.FamilyPlayerIDList = list() + return + + def GetLength(self): + length = 0 + length += 40 + length += 4 + length += 4 + length += 2 + length += 19 + length += 2 + length += 2 + length += len(self.UserData) + length += 1 + length += 4 * self.FamilyPlayerCount + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, 40, self.ItemGUID) + data = CommFunc.WriteDWORD(data, self.FamilyID) + data = CommFunc.WriteDWORD(data, self.ItemID) + data = CommFunc.WriteWORD(data, self.ItemCount) + data = CommFunc.WriteString(data, 19, self.AddTime) + data = CommFunc.WriteWORD(data, self.BidderPrice) + data = CommFunc.WriteWORD(data, self.UserDataLen) + data = CommFunc.WriteString(data, self.UserDataLen, self.UserData) + data = CommFunc.WriteBYTE(data, self.FamilyPlayerCount) + for i in range(self.FamilyPlayerCount): + data = CommFunc.WriteDWORD(data, self.FamilyPlayerIDList[i]) + return data + + def OutputString(self): + DumpString = ''' + ItemGUID:%s, + FamilyID:%d, + ItemID:%d, + ItemCount:%d, + AddTime:%s, + BidderPrice:%d, + UserDataLen:%d, + UserData:%s, + FamilyPlayerCount:%d, + FamilyPlayerIDList:%s + '''\ + %( + self.ItemGUID, + self.FamilyID, + self.ItemID, + self.ItemCount, + self.AddTime, + self.BidderPrice, + self.UserDataLen, + self.UserData, + self.FamilyPlayerCount, + "..." + ) + return DumpString + + +class tagGCPlayerAuctionItemInfo(Structure): + Head = tagHead() + AuctionItemCount = 0 #(WORD AuctionItemCount)//拍品数量 + AuctionItemList = list() #(vector<tagGCPlayerAuctionItem> AuctionItemList)//拍品列表 + 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.AuctionItemCount,_pos = CommFunc.ReadWORD(_lpData, _pos) + for i in range(self.AuctionItemCount): + temAuctionItemList = tagGCPlayerAuctionItem() + _pos = temAuctionItemList.ReadData(_lpData, _pos) + self.AuctionItemList.append(temAuctionItemList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB5 + self.Head.SubCmd = 0x02 + self.AuctionItemCount = 0 + self.AuctionItemList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 2 + for i in range(self.AuctionItemCount): + length += self.AuctionItemList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteWORD(data, self.AuctionItemCount) + for i in range(self.AuctionItemCount): + data = CommFunc.WriteString(data, self.AuctionItemList[i].GetLength(), self.AuctionItemList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + AuctionItemCount:%d, + AuctionItemList:%s + '''\ + %( + self.Head.OutputString(), + self.AuctionItemCount, + "..." + ) + return DumpString + + +m_NAtagGCPlayerAuctionItemInfo=tagGCPlayerAuctionItemInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCPlayerAuctionItemInfo.Head.Cmd,m_NAtagGCPlayerAuctionItemInfo.Head.SubCmd))] = m_NAtagGCPlayerAuctionItemInfo + + +#------------------------------------------------------ +# B5 03 拍卖行玩家拍卖记录 #tagGCPlayerAuctionRecordInfo + +class tagGCPlayerAuctionRecord(Structure): + FamilyID = 0 #(DWORD FamilyID)//有值时为仙盟拍品 + RecordType = 0 #(BYTE RecordType)//记录类型 0-流拍 1-拍卖成交 2-回收 3-竞价成功 4-竞价失败 + RecordTime = "" #(char RecordTime[19])//记录时间 yyyy-MM-dd hh:mm:ss + RecordPrice = 0 #(WORD RecordPrice)//记录价格 + ItemID = 0 #(DWORD ItemID) + ItemCount = 0 #(WORD ItemCount) + UserDataLen = 0 #(WORD UserDataLen) + UserData = "" #(String UserData)//自定义数据 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.FamilyID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.RecordType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.RecordTime,_pos = CommFunc.ReadString(_lpData, _pos,19) + self.RecordPrice,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.ItemID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ItemCount,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.UserDataLen,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.UserData,_pos = CommFunc.ReadString(_lpData, _pos,self.UserDataLen) + return _pos + + def Clear(self): + self.FamilyID = 0 + self.RecordType = 0 + self.RecordTime = "" + self.RecordPrice = 0 + self.ItemID = 0 + self.ItemCount = 0 + self.UserDataLen = 0 + self.UserData = "" + return + + def GetLength(self): + length = 0 + length += 4 + length += 1 + length += 19 + length += 2 + length += 4 + length += 2 + length += 2 + length += len(self.UserData) + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteDWORD(data, self.FamilyID) + data = CommFunc.WriteBYTE(data, self.RecordType) + data = CommFunc.WriteString(data, 19, self.RecordTime) + data = CommFunc.WriteWORD(data, self.RecordPrice) + data = CommFunc.WriteDWORD(data, self.ItemID) + data = CommFunc.WriteWORD(data, self.ItemCount) + data = CommFunc.WriteWORD(data, self.UserDataLen) + data = CommFunc.WriteString(data, self.UserDataLen, self.UserData) + return data + + def OutputString(self): + DumpString = ''' + FamilyID:%d, + RecordType:%d, + RecordTime:%s, + RecordPrice:%d, + ItemID:%d, + ItemCount:%d, + UserDataLen:%d, + UserData:%s + '''\ + %( + self.FamilyID, + self.RecordType, + self.RecordTime, + self.RecordPrice, + self.ItemID, + self.ItemCount, + self.UserDataLen, + self.UserData + ) + return DumpString + + +class tagGCPlayerAuctionRecordInfo(Structure): + Head = tagHead() + Count = 0 #(BYTE Count) + AuctionRecordList = list() #(vector<tagGCPlayerAuctionRecordInfo> AuctionRecordList) + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xB5 + self.Head.SubCmd = 0x03 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.Count): + temAuctionRecordList = tagGCPlayerAuctionRecordInfo() + _pos = temAuctionRecordList.ReadData(_lpData, _pos) + self.AuctionRecordList.append(temAuctionRecordList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xB5 + self.Head.SubCmd = 0x03 + self.Count = 0 + self.AuctionRecordList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + for i in range(self.Count): + length += self.AuctionRecordList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.Count) + for i in range(self.Count): + data = CommFunc.WriteString(data, self.AuctionRecordList[i].GetLength(), self.AuctionRecordList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + Count:%d, + AuctionRecordList:%s + '''\ + %( + self.Head.OutputString(), + self.Count, + "..." + ) + return DumpString + + +m_NAtagGCPlayerAuctionRecordInfo=tagGCPlayerAuctionRecordInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCPlayerAuctionRecordInfo.Head.Cmd,m_NAtagGCPlayerAuctionRecordInfo.Head.SubCmd))] = m_NAtagGCPlayerAuctionRecordInfo #------------------------------------------------------ @@ -8753,64 +9603,92 @@ # C0 06 跨服PK本服赛季状态 #tagGCCrossRealmPKSeasonState class tagGCCrossRealmPKSeasonState(Structure): - _pack_ = 1 - _fields_ = [ - ("Cmd", c_ubyte), - ("SubCmd", c_ubyte), - ("ZoneID", c_ubyte), # 所属赛区ID - ("SeasonID", c_ushort), # 当前赛季ID - ("SeasonState", c_ubyte), # 赛季状态;0-未开启,1-开启中,2-已结束 - ("MatchState", c_ubyte), # 匹配状态;0-未开启;1-开启中 - ] + Head = tagHead() + ZoneID = 0 #(BYTE ZoneID)// 所属赛区ID + SeasonID = 0 #(WORD SeasonID)// 当前赛季ID + SeasonState = 0 #(BYTE SeasonState)// 赛季状态;0-未开启,1-开启中,2-已结束 + MatchState = 0 #(BYTE MatchState)// 匹配状态;0-未开启;1-开启中 + CrossZoneNameLen = 0 #(BYTE CrossZoneNameLen) + CrossZoneName = "" #(String CrossZoneName)// 跨服分区名 + data = None def __init__(self): self.Clear() - self.Cmd = 0xC0 - self.SubCmd = 0x06 + self.Head.Cmd = 0xC0 + self.Head.SubCmd = 0x06 return - def ReadData(self, stringData, _pos=0, _len=0): + def ReadData(self, _lpData, _pos=0, _Len=0): self.Clear() - memmove(addressof(self), stringData[_pos:], self.GetLength()) - return _pos + self.GetLength() + _pos = self.Head.ReadData(_lpData, _pos) + self.ZoneID,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.SeasonID,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.SeasonState,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.MatchState,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.CrossZoneNameLen,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.CrossZoneName,_pos = CommFunc.ReadString(_lpData, _pos,self.CrossZoneNameLen) + return _pos def Clear(self): - self.Cmd = 0xC0 - self.SubCmd = 0x06 + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xC0 + self.Head.SubCmd = 0x06 self.ZoneID = 0 self.SeasonID = 0 self.SeasonState = 0 self.MatchState = 0 + self.CrossZoneNameLen = 0 + self.CrossZoneName = "" return def GetLength(self): - return sizeof(tagGCCrossRealmPKSeasonState) + length = 0 + length += self.Head.GetLength() + length += 1 + length += 2 + length += 1 + length += 1 + length += 1 + length += len(self.CrossZoneName) + + return length def GetBuffer(self): - return string_at(addressof(self), self.GetLength()) + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.ZoneID) + data = CommFunc.WriteWORD(data, self.SeasonID) + data = CommFunc.WriteBYTE(data, self.SeasonState) + data = CommFunc.WriteBYTE(data, self.MatchState) + data = CommFunc.WriteBYTE(data, self.CrossZoneNameLen) + data = CommFunc.WriteString(data, self.CrossZoneNameLen, self.CrossZoneName) + return data def OutputString(self): - DumpString = '''// C0 06 跨服PK本服赛季状态 //tagGCCrossRealmPKSeasonState: - Cmd:%s, - SubCmd:%s, + DumpString = ''' + Head:%s, ZoneID:%d, SeasonID:%d, SeasonState:%d, - MatchState:%d + MatchState:%d, + CrossZoneNameLen:%d, + CrossZoneName:%s '''\ %( - self.Cmd, - self.SubCmd, + self.Head.OutputString(), self.ZoneID, self.SeasonID, self.SeasonState, - self.MatchState + self.MatchState, + self.CrossZoneNameLen, + self.CrossZoneName ) return DumpString m_NAtagGCCrossRealmPKSeasonState=tagGCCrossRealmPKSeasonState() -ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCCrossRealmPKSeasonState.Cmd,m_NAtagGCCrossRealmPKSeasonState.SubCmd))] = m_NAtagGCCrossRealmPKSeasonState +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCCrossRealmPKSeasonState.Head.Cmd,m_NAtagGCCrossRealmPKSeasonState.Head.SubCmd))] = m_NAtagGCCrossRealmPKSeasonState #------------------------------------------------------ @@ -13514,114 +14392,6 @@ m_NAtagMCMagicWeaponLVInfo=tagMCMagicWeaponLVInfo() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCMagicWeaponLVInfo.Head.Cmd,m_NAtagMCMagicWeaponLVInfo.Head.SubCmd))] = m_NAtagMCMagicWeaponLVInfo - - -#------------------------------------------------------ -# A3 BE 通知客户端法宝精炼等级 #tagMCMagicWeaponMsg - -class tagMCMagicWeaponLV(Structure): - _pack_ = 1 - _fields_ = [ - ("MWID", c_int), # 法宝ID - ("MWLV", c_ubyte), # 精炼等级 - ] - - def __init__(self): - self.Clear() - return - - def ReadData(self, stringData, _pos=0, _len=0): - self.Clear() - memmove(addressof(self), stringData[_pos:], self.GetLength()) - return _pos + self.GetLength() - - def Clear(self): - self.MWID = 0 - self.MWLV = 0 - return - - def GetLength(self): - return sizeof(tagMCMagicWeaponLV) - - def GetBuffer(self): - return string_at(addressof(self), self.GetLength()) - - def OutputString(self): - DumpString = '''// A3 BE 通知客户端法宝精炼等级 //tagMCMagicWeaponMsg: - MWID:%d, - MWLV:%d - '''\ - %( - self.MWID, - self.MWLV - ) - return DumpString - - -class tagMCMagicWeaponMsg(Structure): - Head = tagHead() - Count = 0 #(BYTE Count)// 法宝个数 - MWInfo = list() #(vector<tagMCMagicWeaponLV> MWInfo)//法宝信息 - data = None - - def __init__(self): - self.Clear() - self.Head.Cmd = 0xA3 - self.Head.SubCmd = 0xBE - return - - def ReadData(self, _lpData, _pos=0, _Len=0): - self.Clear() - _pos = self.Head.ReadData(_lpData, _pos) - self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) - for i in range(self.Count): - temMWInfo = tagMCMagicWeaponLV() - _pos = temMWInfo.ReadData(_lpData, _pos) - self.MWInfo.append(temMWInfo) - return _pos - - def Clear(self): - self.Head = tagHead() - self.Head.Clear() - self.Head.Cmd = 0xA3 - self.Head.SubCmd = 0xBE - self.Count = 0 - self.MWInfo = list() - return - - def GetLength(self): - length = 0 - length += self.Head.GetLength() - length += 1 - for i in range(self.Count): - length += self.MWInfo[i].GetLength() - - return length - - def GetBuffer(self): - data = '' - data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) - data = CommFunc.WriteBYTE(data, self.Count) - for i in range(self.Count): - data = CommFunc.WriteString(data, self.MWInfo[i].GetLength(), self.MWInfo[i].GetBuffer()) - return data - - def OutputString(self): - DumpString = ''' - Head:%s, - Count:%d, - MWInfo:%s - '''\ - %( - self.Head.OutputString(), - self.Count, - "..." - ) - return DumpString - - -m_NAtagMCMagicWeaponMsg=tagMCMagicWeaponMsg() -ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCMagicWeaponMsg.Head.Cmd,m_NAtagMCMagicWeaponMsg.Head.SubCmd))] = m_NAtagMCMagicWeaponMsg #------------------------------------------------------ @@ -20107,14 +20877,14 @@ #------------------------------------------------------ -# AA 0C 登录奖励活动信息 #tagMCActLoginAwardInfo +# A8 15 诛仙装备分解结果通知 #tagMCZhuXianDecomposeResult -class tagMCActLoginAwardItem(Structure): +class tagMCZhuXianDecomposeItem(Structure): _pack_ = 1 _fields_ = [ - ("ItemID", c_int), # 物品ID - ("ItemCnt", c_ushort), # 物品数量 - ("IsBind", c_ubyte), # 是否绑定 + ("ItemID", c_int), #物品ID + ("ItemCnt", c_ubyte), #物品数量 + ("IsBind", c_ubyte), #是否绑定 ] def __init__(self): @@ -20133,13 +20903,13 @@ return def GetLength(self): - return sizeof(tagMCActLoginAwardItem) + return sizeof(tagMCZhuXianDecomposeItem) def GetBuffer(self): return string_at(addressof(self), self.GetLength()) def OutputString(self): - DumpString = '''// AA 0C 登录奖励活动信息 //tagMCActLoginAwardInfo: + DumpString = '''// A8 15 诛仙装备分解结果通知 //tagMCZhuXianDecomposeResult: ItemID:%d, ItemCnt:%d, IsBind:%d @@ -20152,13 +20922,82 @@ return DumpString +class tagMCZhuXianDecomposeResult(Structure): + Head = tagHead() + Cnt = 0 #(BYTE Cnt)//数量 + ItemList = list() #(vector<tagMCZhuXianDecomposeItem> ItemList) + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xA8 + self.Head.SubCmd = 0x15 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.Cnt,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.Cnt): + temItemList = tagMCZhuXianDecomposeItem() + _pos = temItemList.ReadData(_lpData, _pos) + self.ItemList.append(temItemList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xA8 + self.Head.SubCmd = 0x15 + self.Cnt = 0 + self.ItemList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + for i in range(self.Cnt): + length += self.ItemList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.Cnt) + for i in range(self.Cnt): + data = CommFunc.WriteString(data, self.ItemList[i].GetLength(), self.ItemList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + Cnt:%d, + ItemList:%s + '''\ + %( + self.Head.OutputString(), + self.Cnt, + "..." + ) + return DumpString + + +m_NAtagMCZhuXianDecomposeResult=tagMCZhuXianDecomposeResult() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCZhuXianDecomposeResult.Head.Cmd,m_NAtagMCZhuXianDecomposeResult.Head.SubCmd))] = m_NAtagMCZhuXianDecomposeResult + + +#------------------------------------------------------ +# AA 0C 登录奖励活动信息 #tagMCActLoginAwardInfo + class tagMCActLoginAwardAction(Structure): TemplateID = 0 #(DWORD TemplateID)// 模板ID ActionType = 0 #(WORD ActionType)// 活动类别 TotalTimes = 0 #(DWORD TotalTimes)// 可完成的总次数,0表示不限次数 SingleTimes = 0 #(DWORD SingleTimes)// 单次领奖需要的次数 - Count = 0 #(BYTE Count)// 物品数 - ItemInfo = list() #(vector<tagMCActLoginAwardItem> ItemInfo)// 物品信息 + Count = 0 #(WORD Count)// 物品配置长度 + ItemInfo = "" #(String ItemInfo)// 物品信息 data = None def __init__(self): @@ -20171,11 +21010,8 @@ self.ActionType,_pos = CommFunc.ReadWORD(_lpData, _pos) self.TotalTimes,_pos = CommFunc.ReadDWORD(_lpData, _pos) self.SingleTimes,_pos = CommFunc.ReadDWORD(_lpData, _pos) - self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) - for i in range(self.Count): - temItemInfo = tagMCActLoginAwardItem() - _pos = temItemInfo.ReadData(_lpData, _pos) - self.ItemInfo.append(temItemInfo) + self.Count,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.ItemInfo,_pos = CommFunc.ReadString(_lpData, _pos,self.Count) return _pos def Clear(self): @@ -20184,7 +21020,7 @@ self.TotalTimes = 0 self.SingleTimes = 0 self.Count = 0 - self.ItemInfo = list() + self.ItemInfo = "" return def GetLength(self): @@ -20193,9 +21029,8 @@ length += 2 length += 4 length += 4 - length += 1 - for i in range(self.Count): - length += self.ItemInfo[i].GetLength() + length += 2 + length += len(self.ItemInfo) return length @@ -20205,9 +21040,8 @@ data = CommFunc.WriteWORD(data, self.ActionType) data = CommFunc.WriteDWORD(data, self.TotalTimes) data = CommFunc.WriteDWORD(data, self.SingleTimes) - data = CommFunc.WriteBYTE(data, self.Count) - for i in range(self.Count): - data = CommFunc.WriteString(data, self.ItemInfo[i].GetLength(), self.ItemInfo[i].GetBuffer()) + data = CommFunc.WriteWORD(data, self.Count) + data = CommFunc.WriteString(data, self.Count, self.ItemInfo) return data def OutputString(self): @@ -20225,7 +21059,7 @@ self.TotalTimes, self.SingleTimes, self.Count, - "..." + self.ItemInfo ) return DumpString @@ -20233,6 +21067,7 @@ class tagMCActLoginAwardDayInfo(Structure): ActCnt = 0 #(BYTE ActCnt)// 数量 TemplateList = list() #(vector<WORD> TemplateList)// 模板列表 + WorldLV = 0 #(WORD WorldLV)// 世界等级 data = None def __init__(self): @@ -20245,17 +21080,20 @@ for i in range(self.ActCnt): value,_pos=CommFunc.ReadWORD(_lpData,_pos) self.TemplateList.append(value) + self.WorldLV,_pos = CommFunc.ReadWORD(_lpData, _pos) return _pos def Clear(self): self.ActCnt = 0 self.TemplateList = list() + self.WorldLV = 0 return def GetLength(self): length = 0 length += 1 length += 2 * self.ActCnt + length += 2 return length @@ -20264,16 +21102,19 @@ data = CommFunc.WriteBYTE(data, self.ActCnt) for i in range(self.ActCnt): data = CommFunc.WriteWORD(data, self.TemplateList[i]) + data = CommFunc.WriteWORD(data, self.WorldLV) return data def OutputString(self): DumpString = ''' ActCnt:%d, - TemplateList:%s + TemplateList:%s, + WorldLV:%d '''\ %( self.ActCnt, - "..." + "...", + self.WorldLV ) return DumpString @@ -21942,6 +22783,518 @@ #------------------------------------------------------ +# AA 20 节日巡礼活动信息 #tagMCFeastWeekPartyInfo + +class tagMCFeastWeekPartyItem(Structure): + _pack_ = 1 + _fields_ = [ + ("NeedPoint", c_ushort), # 领奖需要积分 + ("ItemID", c_int), # 物品ID + ("ItemCnt", c_ushort), # 物品数量 + ("IsBind", c_ubyte), # 是否绑定 + ] + + def __init__(self): + self.Clear() + return + + def ReadData(self, stringData, _pos=0, _len=0): + self.Clear() + memmove(addressof(self), stringData[_pos:], self.GetLength()) + return _pos + self.GetLength() + + def Clear(self): + self.NeedPoint = 0 + self.ItemID = 0 + self.ItemCnt = 0 + self.IsBind = 0 + return + + def GetLength(self): + return sizeof(tagMCFeastWeekPartyItem) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 20 节日巡礼活动信息 //tagMCFeastWeekPartyInfo: + NeedPoint:%d, + ItemID:%d, + ItemCnt:%d, + IsBind:%d + '''\ + %( + self.NeedPoint, + self.ItemID, + self.ItemCnt, + self.IsBind + ) + return DumpString + + +class tagMCFeastWeekPartyAction(Structure): + TemplateID = 0 #(DWORD TemplateID)// 模板ID + ActionType = 0 #(WORD ActionType)// 活动类别 + TotalTimes = 0 #(DWORD TotalTimes)// 可完成的总次数,0表示不限次数 + SingleTimes = 0 #(DWORD SingleTimes)// 单次领奖需要的次数 + Point = 0 #(DWORD Point)// 单次领奖积分 + Count = 0 #(BYTE Count)// 物品数 + ItemInfo = list() #(vector<tagMCFeastWeekPartyItem> ItemInfo)// 物品信息 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.TemplateID,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ActionType,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.TotalTimes,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.SingleTimes,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Point,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.Count): + temItemInfo = tagMCFeastWeekPartyItem() + _pos = temItemInfo.ReadData(_lpData, _pos) + self.ItemInfo.append(temItemInfo) + return _pos + + def Clear(self): + self.TemplateID = 0 + self.ActionType = 0 + self.TotalTimes = 0 + self.SingleTimes = 0 + self.Point = 0 + self.Count = 0 + self.ItemInfo = list() + return + + def GetLength(self): + length = 0 + length += 4 + length += 2 + length += 4 + length += 4 + length += 4 + length += 1 + for i in range(self.Count): + length += self.ItemInfo[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteDWORD(data, self.TemplateID) + data = CommFunc.WriteWORD(data, self.ActionType) + data = CommFunc.WriteDWORD(data, self.TotalTimes) + data = CommFunc.WriteDWORD(data, self.SingleTimes) + data = CommFunc.WriteDWORD(data, self.Point) + data = CommFunc.WriteBYTE(data, self.Count) + for i in range(self.Count): + data = CommFunc.WriteString(data, self.ItemInfo[i].GetLength(), self.ItemInfo[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + TemplateID:%d, + ActionType:%d, + TotalTimes:%d, + SingleTimes:%d, + Point:%d, + Count:%d, + ItemInfo:%s + '''\ + %( + self.TemplateID, + self.ActionType, + self.TotalTimes, + self.SingleTimes, + self.Point, + self.Count, + "..." + ) + return DumpString + + +class tagMCFeastWeekPartyDayInfo(Structure): + ActCnt = 0 #(BYTE ActCnt)// 数量 + TemplateList = list() #(vector<WORD> TemplateList)// 模板列表 + PCount = 0 #(BYTE PCount)// 物品数 + PItemInfo = list() #(vector<tagMCFeastWeekPartyItem> PItemInfo)// 物品信息 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.ActCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.ActCnt): + value,_pos=CommFunc.ReadWORD(_lpData,_pos) + self.TemplateList.append(value) + self.PCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.PCount): + temPItemInfo = tagMCFeastWeekPartyItem() + _pos = temPItemInfo.ReadData(_lpData, _pos) + self.PItemInfo.append(temPItemInfo) + return _pos + + def Clear(self): + self.ActCnt = 0 + self.TemplateList = list() + self.PCount = 0 + self.PItemInfo = list() + return + + def GetLength(self): + length = 0 + length += 1 + length += 2 * self.ActCnt + length += 1 + for i in range(self.PCount): + length += self.PItemInfo[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteBYTE(data, self.ActCnt) + for i in range(self.ActCnt): + data = CommFunc.WriteWORD(data, self.TemplateList[i]) + data = CommFunc.WriteBYTE(data, self.PCount) + for i in range(self.PCount): + data = CommFunc.WriteString(data, self.PItemInfo[i].GetLength(), self.PItemInfo[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + ActCnt:%d, + TemplateList:%s, + PCount:%d, + PItemInfo:%s + '''\ + %( + self.ActCnt, + "...", + self.PCount, + "..." + ) + return DumpString + + +class tagMCFeastWeekPartyInfo(Structure): + Head = tagHead() + StartDate = "" #(char StartDate[10])// 开始日期 y-m-d + EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d + AdvanceMinutes = 0 #(WORD AdvanceMinutes)// 提前显示分钟 + IsDayReset = 0 #(BYTE IsDayReset)//是否每天重置 + ResetType = 0 #(BYTE ResetType)// 重置类型,0-0点重置;1-5点重置 + LimitLV = 0 #(WORD LimitLV)// 限制等级 + DayCnt = 0 #(BYTE DayCnt)// 天数 + DayInfoList = list() #(vector<tagMCFeastWeekPartyDayInfo> DayInfoList)// 每天模板 + TCount = 0 #(BYTE TCount)// 模板数 + ActionInfo = list() #(vector<tagMCFeastWeekPartyAction> ActionInfo)// 活动模板信息 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x20 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.AdvanceMinutes,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.IsDayReset,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.ResetType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.DayCnt,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.DayCnt): + temDayInfoList = tagMCFeastWeekPartyDayInfo() + _pos = temDayInfoList.ReadData(_lpData, _pos) + self.DayInfoList.append(temDayInfoList) + self.TCount,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.TCount): + temActionInfo = tagMCFeastWeekPartyAction() + _pos = temActionInfo.ReadData(_lpData, _pos) + self.ActionInfo.append(temActionInfo) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x20 + self.StartDate = "" + self.EndtDate = "" + self.AdvanceMinutes = 0 + self.IsDayReset = 0 + self.ResetType = 0 + self.LimitLV = 0 + self.DayCnt = 0 + self.DayInfoList = list() + self.TCount = 0 + self.ActionInfo = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 10 + length += 10 + length += 2 + length += 1 + length += 1 + length += 2 + length += 1 + for i in range(self.DayCnt): + length += self.DayInfoList[i].GetLength() + length += 1 + for i in range(self.TCount): + length += self.ActionInfo[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteString(data, 10, self.StartDate) + data = CommFunc.WriteString(data, 10, self.EndtDate) + data = CommFunc.WriteWORD(data, self.AdvanceMinutes) + data = CommFunc.WriteBYTE(data, self.IsDayReset) + data = CommFunc.WriteBYTE(data, self.ResetType) + data = CommFunc.WriteWORD(data, self.LimitLV) + data = CommFunc.WriteBYTE(data, self.DayCnt) + for i in range(self.DayCnt): + data = CommFunc.WriteString(data, self.DayInfoList[i].GetLength(), self.DayInfoList[i].GetBuffer()) + data = CommFunc.WriteBYTE(data, self.TCount) + for i in range(self.TCount): + data = CommFunc.WriteString(data, self.ActionInfo[i].GetLength(), self.ActionInfo[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + StartDate:%s, + EndtDate:%s, + AdvanceMinutes:%d, + IsDayReset:%d, + ResetType:%d, + LimitLV:%d, + DayCnt:%d, + DayInfoList:%s, + TCount:%d, + ActionInfo:%s + '''\ + %( + self.Head.OutputString(), + self.StartDate, + self.EndtDate, + self.AdvanceMinutes, + self.IsDayReset, + self.ResetType, + self.LimitLV, + self.DayCnt, + "...", + self.TCount, + "..." + ) + return DumpString + + +m_NAtagMCFeastWeekPartyInfo=tagMCFeastWeekPartyInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFeastWeekPartyInfo.Head.Cmd,m_NAtagMCFeastWeekPartyInfo.Head.SubCmd))] = m_NAtagMCFeastWeekPartyInfo + + +#------------------------------------------------------ +# AA 21 节日巡礼玩家活动信息 #tagMCFeastWeekPartyPlayerInfo + +class tagMCFeastWeekPartyTaskInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("TemplateID", c_ushort), # 模板ID + ("CurTimes", c_int), #已完成次数 + ("GotTimes", c_int), #已领取次数 + ] + + def __init__(self): + self.Clear() + return + + def ReadData(self, stringData, _pos=0, _len=0): + self.Clear() + memmove(addressof(self), stringData[_pos:], self.GetLength()) + return _pos + self.GetLength() + + def Clear(self): + self.TemplateID = 0 + self.CurTimes = 0 + self.GotTimes = 0 + return + + def GetLength(self): + return sizeof(tagMCFeastWeekPartyTaskInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 21 节日巡礼玩家活动信息 //tagMCFeastWeekPartyPlayerInfo: + TemplateID:%d, + CurTimes:%d, + GotTimes:%d + '''\ + %( + self.TemplateID, + self.CurTimes, + self.GotTimes + ) + return DumpString + + +class tagMCFeastWeekPartyDayPlayerInfo(Structure): + DayIndex = 0 #(DWORD DayIndex)//第X天 + Point = 0 #(DWORD Point)//积分 + AwardRecord = 0 #(DWORD AwardRecord)//积分领奖记录 + ACount = 0 #(DWORD ACount)//任务条目数 + TaskList = list() #(vector<tagMCFeastWeekPartyTaskInfo> TaskList)//活动完成次数信息 + data = None + + def __init__(self): + self.Clear() + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + self.DayIndex,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Point,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.AwardRecord,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.ACount,_pos = CommFunc.ReadDWORD(_lpData, _pos) + for i in range(self.ACount): + temTaskList = tagMCFeastWeekPartyTaskInfo() + _pos = temTaskList.ReadData(_lpData, _pos) + self.TaskList.append(temTaskList) + return _pos + + def Clear(self): + self.DayIndex = 0 + self.Point = 0 + self.AwardRecord = 0 + self.ACount = 0 + self.TaskList = list() + return + + def GetLength(self): + length = 0 + length += 4 + length += 4 + length += 4 + length += 4 + for i in range(self.ACount): + length += self.TaskList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteDWORD(data, self.DayIndex) + data = CommFunc.WriteDWORD(data, self.Point) + data = CommFunc.WriteDWORD(data, self.AwardRecord) + data = CommFunc.WriteDWORD(data, self.ACount) + for i in range(self.ACount): + data = CommFunc.WriteString(data, self.TaskList[i].GetLength(), self.TaskList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + DayIndex:%d, + Point:%d, + AwardRecord:%d, + ACount:%d, + TaskList:%s + '''\ + %( + self.DayIndex, + self.Point, + self.AwardRecord, + self.ACount, + "..." + ) + return DumpString + + +class tagMCFeastWeekPartyPlayerInfo(Structure): + Head = tagHead() + Count = 0 #(BYTE Count) + DayInfoList = list() #(vector<tagMCFeastWeekPartyDayPlayerInfo> DayInfoList)//活动完成次数信息 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x21 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.Count): + temDayInfoList = tagMCFeastWeekPartyDayPlayerInfo() + _pos = temDayInfoList.ReadData(_lpData, _pos) + self.DayInfoList.append(temDayInfoList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x21 + self.Count = 0 + self.DayInfoList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 1 + for i in range(self.Count): + length += self.DayInfoList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteBYTE(data, self.Count) + for i in range(self.Count): + data = CommFunc.WriteString(data, self.DayInfoList[i].GetLength(), self.DayInfoList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + Count:%d, + DayInfoList:%s + '''\ + %( + self.Head.OutputString(), + self.Count, + "..." + ) + return DumpString + + +m_NAtagMCFeastWeekPartyPlayerInfo=tagMCFeastWeekPartyPlayerInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFeastWeekPartyPlayerInfo.Head.Cmd,m_NAtagMCFeastWeekPartyPlayerInfo.Head.SubCmd))] = m_NAtagMCFeastWeekPartyPlayerInfo + + +#------------------------------------------------------ # AA 02 首充信息 #tagMCFirstGoldInfo class tagMCFirstGoldInfo(Structure): @@ -22926,6 +24279,395 @@ m_NAtagMCFlashSaleInfo=tagMCFlashSaleInfo() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFlashSaleInfo.Head.Cmd,m_NAtagMCFlashSaleInfo.Head.SubCmd))] = m_NAtagMCFlashSaleInfo + + +#------------------------------------------------------ +# AA 1F 幸运鉴宝活动信息 #tagMCLuckyTreasureInfo + +class tagMCLuckyTreasureItem(Structure): + _pack_ = 1 + _fields_ = [ + ("ItemID", c_int), # 物品ID + ("ItemCnt", c_ushort), # 物品数量 + ("IsBind", c_ubyte), # 是否绑定 + ] + + def __init__(self): + self.Clear() + return + + def ReadData(self, stringData, _pos=0, _len=0): + self.Clear() + memmove(addressof(self), stringData[_pos:], self.GetLength()) + return _pos + self.GetLength() + + def Clear(self): + self.ItemID = 0 + self.ItemCnt = 0 + self.IsBind = 0 + return + + def GetLength(self): + return sizeof(tagMCLuckyTreasureItem) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 1F 幸运鉴宝活动信息 //tagMCLuckyTreasureInfo: + ItemID:%d, + ItemCnt:%d, + IsBind:%d + '''\ + %( + self.ItemID, + self.ItemCnt, + self.IsBind + ) + return DumpString + + +class tagMCLuckyTreasureInfo(Structure): + Head = tagHead() + StartDate = "" #(char StartDate[10])// 开始日期 y-m-d + EndtDate = "" #(char EndtDate[10])// 结束日期 y-m-d + ResetType = 0 #(BYTE ResetType)// 重置类型,0-0点重置;1-5点重置 + LimitLV = 0 #(WORD LimitLV)// 限制等级 + LuckyPoint = 0 #(WORD LuckyPoint)// 总幸运值 + Count = 0 #(WORD Count)// 物品数 + ItemList = list() #(vector<tagMCLuckyTreasureItem> ItemList)// 随机库物品信息 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x1F + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.StartDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.EndtDate,_pos = CommFunc.ReadString(_lpData, _pos,10) + self.ResetType,_pos = CommFunc.ReadBYTE(_lpData, _pos) + self.LimitLV,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.LuckyPoint,_pos = CommFunc.ReadWORD(_lpData, _pos) + self.Count,_pos = CommFunc.ReadWORD(_lpData, _pos) + for i in range(self.Count): + temItemList = tagMCLuckyTreasureItem() + _pos = temItemList.ReadData(_lpData, _pos) + self.ItemList.append(temItemList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x1F + self.StartDate = "" + self.EndtDate = "" + self.ResetType = 0 + self.LimitLV = 0 + self.LuckyPoint = 0 + self.Count = 0 + self.ItemList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 10 + length += 10 + length += 1 + length += 2 + length += 2 + length += 2 + for i in range(self.Count): + length += self.ItemList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteString(data, 10, self.StartDate) + data = CommFunc.WriteString(data, 10, self.EndtDate) + data = CommFunc.WriteBYTE(data, self.ResetType) + data = CommFunc.WriteWORD(data, self.LimitLV) + data = CommFunc.WriteWORD(data, self.LuckyPoint) + data = CommFunc.WriteWORD(data, self.Count) + for i in range(self.Count): + data = CommFunc.WriteString(data, self.ItemList[i].GetLength(), self.ItemList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + StartDate:%s, + EndtDate:%s, + ResetType:%d, + LimitLV:%d, + LuckyPoint:%d, + Count:%d, + ItemList:%s + '''\ + %( + self.Head.OutputString(), + self.StartDate, + self.EndtDate, + self.ResetType, + self.LimitLV, + self.LuckyPoint, + self.Count, + "..." + ) + return DumpString + + +m_NAtagMCLuckyTreasureInfo=tagMCLuckyTreasureInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCLuckyTreasureInfo.Head.Cmd,m_NAtagMCLuckyTreasureInfo.Head.SubCmd))] = m_NAtagMCLuckyTreasureInfo + + +#------------------------------------------------------ +# AA 1E 幸运鉴宝结果信息 #tagMCLuckyTreasureResultInfo + +class tagMCLuckyTreasureResultInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("LuckyPoint", c_ushort), # 当前幸运点 + ("HasFree", c_ubyte), # 是否免费过 + ("ItemID", c_int), # 物品ID + ("ItemCnt", c_ushort), #物品数量 + ("IsBind", c_ubyte), # 是否绑定 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xAA + self.SubCmd = 0x1E + 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 = 0xAA + self.SubCmd = 0x1E + self.LuckyPoint = 0 + self.HasFree = 0 + self.ItemID = 0 + self.ItemCnt = 0 + self.IsBind = 0 + return + + def GetLength(self): + return sizeof(tagMCLuckyTreasureResultInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 1E 幸运鉴宝结果信息 //tagMCLuckyTreasureResultInfo: + Cmd:%s, + SubCmd:%s, + LuckyPoint:%d, + HasFree:%d, + ItemID:%d, + ItemCnt:%d, + IsBind:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.LuckyPoint, + self.HasFree, + self.ItemID, + self.ItemCnt, + self.IsBind + ) + return DumpString + + +m_NAtagMCLuckyTreasureResultInfo=tagMCLuckyTreasureResultInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCLuckyTreasureResultInfo.Cmd,m_NAtagMCLuckyTreasureResultInfo.SubCmd))] = m_NAtagMCLuckyTreasureResultInfo + + +#------------------------------------------------------ +# AA 23 新仙界盛典全民来嗨玩家信息 #tagMCNewAllPeoplePartyInfo + +class tagMCNewAllPeoplePartyCount(Structure): + _pack_ = 1 + _fields_ = [ + ("ActID", c_int), #活动ID + ("CurTimes", c_ushort), #已完成次数 + ] + + def __init__(self): + self.Clear() + return + + def ReadData(self, stringData, _pos=0, _len=0): + self.Clear() + memmove(addressof(self), stringData[_pos:], self.GetLength()) + return _pos + self.GetLength() + + def Clear(self): + self.ActID = 0 + self.CurTimes = 0 + return + + def GetLength(self): + return sizeof(tagMCNewAllPeoplePartyCount) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 23 新仙界盛典全民来嗨玩家信息 //tagMCNewAllPeoplePartyInfo: + ActID:%d, + CurTimes:%d + '''\ + %( + self.ActID, + self.CurTimes + ) + return DumpString + + +class tagMCNewAllPeoplePartyInfo(Structure): + Head = tagHead() + CurPoint = 0 #(DWORD CurPoint)//当前总点数 + AwardRecord = 0 #(DWORD AwardRecord)//领奖记录 按奖励索引二进制位存储是否已领取 + Count = 0 #(BYTE Count) + BuyCountList = list() #(vector<tagMCNewAllPeoplePartyCount> BuyCountList)//活动完成次数信息 + data = None + + def __init__(self): + self.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x23 + return + + def ReadData(self, _lpData, _pos=0, _Len=0): + self.Clear() + _pos = self.Head.ReadData(_lpData, _pos) + self.CurPoint,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.AwardRecord,_pos = CommFunc.ReadDWORD(_lpData, _pos) + self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos) + for i in range(self.Count): + temBuyCountList = tagMCNewAllPeoplePartyCount() + _pos = temBuyCountList.ReadData(_lpData, _pos) + self.BuyCountList.append(temBuyCountList) + return _pos + + def Clear(self): + self.Head = tagHead() + self.Head.Clear() + self.Head.Cmd = 0xAA + self.Head.SubCmd = 0x23 + self.CurPoint = 0 + self.AwardRecord = 0 + self.Count = 0 + self.BuyCountList = list() + return + + def GetLength(self): + length = 0 + length += self.Head.GetLength() + length += 4 + length += 4 + length += 1 + for i in range(self.Count): + length += self.BuyCountList[i].GetLength() + + return length + + def GetBuffer(self): + data = '' + data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer()) + data = CommFunc.WriteDWORD(data, self.CurPoint) + data = CommFunc.WriteDWORD(data, self.AwardRecord) + data = CommFunc.WriteBYTE(data, self.Count) + for i in range(self.Count): + data = CommFunc.WriteString(data, self.BuyCountList[i].GetLength(), self.BuyCountList[i].GetBuffer()) + return data + + def OutputString(self): + DumpString = ''' + Head:%s, + CurPoint:%d, + AwardRecord:%d, + Count:%d, + BuyCountList:%s + '''\ + %( + self.Head.OutputString(), + self.CurPoint, + self.AwardRecord, + self.Count, + "..." + ) + return DumpString + + +m_NAtagMCNewAllPeoplePartyInfo=tagMCNewAllPeoplePartyInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCNewAllPeoplePartyInfo.Head.Cmd,m_NAtagMCNewAllPeoplePartyInfo.Head.SubCmd))] = m_NAtagMCNewAllPeoplePartyInfo + + +#------------------------------------------------------ +# AA 22 新仙界盛典充值大礼 #tagMCNewXJSDRecharge + +class tagMCNewXJSDRecharge(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("State", c_ubyte), #0-不可领 1-可领 2-已领取 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xAA + 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 = 0xAA + self.SubCmd = 0x22 + self.State = 0 + return + + def GetLength(self): + return sizeof(tagMCNewXJSDRecharge) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AA 22 新仙界盛典充值大礼 //tagMCNewXJSDRecharge: + Cmd:%s, + SubCmd:%s, + State:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.State + ) + return DumpString + + +m_NAtagMCNewXJSDRecharge=tagMCNewXJSDRecharge() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCNewXJSDRecharge.Cmd,m_NAtagMCNewXJSDRecharge.SubCmd))] = m_NAtagMCNewXJSDRecharge #------------------------------------------------------ @@ -24875,6 +26617,62 @@ m_NAtagMCDiceAward=tagMCDiceAward() ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCDiceAward.Cmd,m_NAtagMCDiceAward.SubCmd))] = m_NAtagMCDiceAward + + +#------------------------------------------------------ +# AB 25 节日红包信息 #tagMCFeastRedPackInfo + +class tagMCFeastRedPackInfo(Structure): + _pack_ = 1 + _fields_ = [ + ("Cmd", c_ubyte), + ("SubCmd", c_ubyte), + ("MoneyNum", c_int), # 累积抢到多少钱 + ("GrabCnt", c_ushort), # 已抢红包次数 + ] + + def __init__(self): + self.Clear() + self.Cmd = 0xAB + 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 = 0xAB + self.SubCmd = 0x25 + self.MoneyNum = 0 + self.GrabCnt = 0 + return + + def GetLength(self): + return sizeof(tagMCFeastRedPackInfo) + + def GetBuffer(self): + return string_at(addressof(self), self.GetLength()) + + def OutputString(self): + DumpString = '''// AB 25 节日红包信息 //tagMCFeastRedPackInfo: + Cmd:%s, + SubCmd:%s, + MoneyNum:%d, + GrabCnt:%d + '''\ + %( + self.Cmd, + self.SubCmd, + self.MoneyNum, + self.GrabCnt + ) + return DumpString + + +m_NAtagMCFeastRedPackInfo=tagMCFeastRedPackInfo() +ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFeastRedPackInfo.Cmd,m_NAtagMCFeastRedPackInfo.SubCmd))] = m_NAtagMCFeastRedPackInfo #------------------------------------------------------ @@ -27421,6 +29219,7 @@ ("Cmd", c_ubyte), ("SubCmd", c_ubyte), ("Floor", c_int), # 已通关层 + ("LastFloor", c_int), # 上次挑战层 ] def __init__(self): @@ -27438,6 +29237,7 @@ self.Cmd = 0xB2 self.SubCmd = 0x13 self.Floor = 0 + self.LastFloor = 0 return def GetLength(self): @@ -27450,12 +29250,14 @@ DumpString = '''// B2 13 诛仙塔通关层数 //tagMCZhuXianTowerInfo: Cmd:%s, SubCmd:%s, - Floor:%d + Floor:%d, + LastFloor:%d '''\ %( self.Cmd, self.SubCmd, - self.Floor + self.Floor, + self.LastFloor ) return DumpString -- Gitblit v1.8.0