| | |
| | |
|
| | | class tagGCFeastRedPacketDay(Structure):
|
| | | RedPacketCount = 0 #(BYTE RedPacketCount)
|
| | | RedPacketIDList = list() #(vector<WORD> RedPacketIDList)// 当日定时发放的系统红包ID列表
|
| | | RedPacketIDList = list() #(vector<WORD> RedPacketIDList)// 当日定时发放的系统红包表ID列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | |
| | |
|
| | | m_NAtagGCVoiceChat=tagGCVoiceChat()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagGCVoiceChat.Head.Cmd,m_NAtagGCVoiceChat.Head.SubCmd))] = m_NAtagGCVoiceChat
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # 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()
|
| | | QueryType = 0 #(DWORD QueryType)//查询的分类标识
|
| | | QueryCount = 0 #(BYTE QueryCount)//指定返回个数,0为全部
|
| | | IsFamily = 0 #(BYTE IsFamily)//是否查询仙盟拍品
|
| | | 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.QueryType,_pos = CommFunc.ReadDWORD(_lpData, _pos)
|
| | | self.QueryCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.IsFamily,_pos = CommFunc.ReadBYTE(_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.QueryType = 0
|
| | | self.QueryCount = 0
|
| | | self.IsFamily = 0
|
| | | self.AuctionItemCount = 0
|
| | | self.AuctionItemList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 4
|
| | | length += 1
|
| | | length += 1
|
| | | 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.WriteDWORD(data, self.QueryType)
|
| | | data = CommFunc.WriteBYTE(data, self.QueryCount)
|
| | | data = CommFunc.WriteBYTE(data, self.IsFamily)
|
| | | 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,
|
| | | QueryType:%d,
|
| | | QueryCount:%d,
|
| | | IsFamily:%d,
|
| | | AuctionItemCount:%d,
|
| | | AuctionItemList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.QueryType,
|
| | | self.QueryCount,
|
| | | self.IsFamily,
|
| | | 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
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | | # 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
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | | #------------------------------------------------------
|
| | | # AA 0C 登录奖励活动信息 #tagMCActLoginAwardInfo
|
| | |
|
| | | class tagMCActLoginAwardItem(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(tagMCActLoginAwardItem)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AA 0C 登录奖励活动信息 //tagMCActLoginAwardInfo:
|
| | | ItemID:%d,
|
| | | ItemCnt:%d,
|
| | | IsBind:%d
|
| | | '''\
|
| | | %(
|
| | | self.ItemID,
|
| | | self.ItemCnt,
|
| | | self.IsBind
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | 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):
|
| | |
| | | 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):
|
| | |
| | | self.TotalTimes = 0
|
| | | self.SingleTimes = 0
|
| | | self.Count = 0
|
| | | self.ItemInfo = list()
|
| | | self.ItemInfo = ""
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | 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
|
| | |
|
| | |
| | | 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):
|
| | |
| | | self.TotalTimes,
|
| | | self.SingleTimes,
|
| | | self.Count,
|
| | | "..."
|
| | | self.ItemInfo
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
| | | class tagMCActLoginAwardDayInfo(Structure):
|
| | | ActCnt = 0 #(BYTE ActCnt)// 数量
|
| | | TemplateList = list() #(vector<WORD> TemplateList)// 模板列表
|
| | | WorldLV = 0 #(WORD WorldLV)// 世界等级
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | |
| | | 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
|
| | |
|
| | |
| | | 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
|
| | |
|
| | |
| | | class tagMCFeastWeekPartyPlayerInfo(Structure):
|
| | | Head = tagHead()
|
| | | Count = 0 #(BYTE Count)
|
| | | DayInfoList = list() #(vector<tagMCWeekPartyDayPlayerInfo> DayInfoList)//活动完成次数信息
|
| | | DayInfoList = list() #(vector<tagMCFeastWeekPartyDayPlayerInfo> DayInfoList)//活动完成次数信息
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | |
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.Count,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.Count):
|
| | | temDayInfoList = tagMCWeekPartyDayPlayerInfo()
|
| | | temDayInfoList = tagMCFeastWeekPartyDayPlayerInfo()
|
| | | _pos = temDayInfoList.ReadData(_lpData, _pos)
|
| | | self.DayInfoList.append(temDayInfoList)
|
| | | return _pos
|
| | |
| | |
|
| | | 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
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | |
|
| | | m_NAtagMCExchangeActionItemCntRecord=tagMCExchangeActionItemCntRecord()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCExchangeActionItemCntRecord.Head.Cmd,m_NAtagMCExchangeActionItemCntRecord.Head.SubCmd))] = m_NAtagMCExchangeActionItemCntRecord
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # AB 26 节日红包任务进度信息 #tagMCFeastRedPackTaskInfo
|
| | |
|
| | | class tagMCFeastRedPackTaskProgress(Structure):
|
| | | _pack_ = 1
|
| | | _fields_ = [
|
| | | ("TaskType", c_ubyte), #任务类型
|
| | | ("TaskData", c_int), #任务数据
|
| | | ("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.TaskType = 0
|
| | | self.TaskData = 0
|
| | | self.CurTimes = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | return sizeof(tagMCFeastRedPackTaskProgress)
|
| | |
|
| | | def GetBuffer(self):
|
| | | return string_at(addressof(self), self.GetLength())
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''// AB 26 节日红包任务进度信息 //tagMCFeastRedPackTaskInfo:
|
| | | TaskType:%d,
|
| | | TaskData:%d,
|
| | | CurTimes:%d
|
| | | '''\
|
| | | %(
|
| | | self.TaskType,
|
| | | self.TaskData,
|
| | | self.CurTimes
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | class tagMCFeastRedPackTaskInfo(Structure):
|
| | | Head = tagHead()
|
| | | FeastDay = 0 #(BYTE FeastDay)//节日第几天
|
| | | TaskCount = 0 #(BYTE TaskCount)//今日任务数
|
| | | TaskProgressList = list() #(vector<tagMCFeastRedPackTaskProgress> TaskProgressList)// 任务进度信息列表
|
| | | data = None
|
| | |
|
| | | def __init__(self):
|
| | | self.Clear()
|
| | | self.Head.Cmd = 0xAB
|
| | | self.Head.SubCmd = 0x26
|
| | | return
|
| | |
|
| | | def ReadData(self, _lpData, _pos=0, _Len=0):
|
| | | self.Clear()
|
| | | _pos = self.Head.ReadData(_lpData, _pos)
|
| | | self.FeastDay,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | self.TaskCount,_pos = CommFunc.ReadBYTE(_lpData, _pos)
|
| | | for i in range(self.TaskCount):
|
| | | temTaskProgressList = tagMCFeastRedPackTaskProgress()
|
| | | _pos = temTaskProgressList.ReadData(_lpData, _pos)
|
| | | self.TaskProgressList.append(temTaskProgressList)
|
| | | return _pos
|
| | |
|
| | | def Clear(self):
|
| | | self.Head = tagHead()
|
| | | self.Head.Clear()
|
| | | self.Head.Cmd = 0xAB
|
| | | self.Head.SubCmd = 0x26
|
| | | self.FeastDay = 0
|
| | | self.TaskCount = 0
|
| | | self.TaskProgressList = list()
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | | length = 0
|
| | | length += self.Head.GetLength()
|
| | | length += 1
|
| | | length += 1
|
| | | for i in range(self.TaskCount):
|
| | | length += self.TaskProgressList[i].GetLength()
|
| | |
|
| | | return length
|
| | |
|
| | | def GetBuffer(self):
|
| | | data = ''
|
| | | data = CommFunc.WriteString(data, self.Head.GetLength(), self.Head.GetBuffer())
|
| | | data = CommFunc.WriteBYTE(data, self.FeastDay)
|
| | | data = CommFunc.WriteBYTE(data, self.TaskCount)
|
| | | for i in range(self.TaskCount):
|
| | | data = CommFunc.WriteString(data, self.TaskProgressList[i].GetLength(), self.TaskProgressList[i].GetBuffer())
|
| | | return data
|
| | |
|
| | | def OutputString(self):
|
| | | DumpString = '''
|
| | | Head:%s,
|
| | | FeastDay:%d,
|
| | | TaskCount:%d,
|
| | | TaskProgressList:%s
|
| | | '''\
|
| | | %(
|
| | | self.Head.OutputString(),
|
| | | self.FeastDay,
|
| | | self.TaskCount,
|
| | | "..."
|
| | | )
|
| | | return DumpString
|
| | |
|
| | |
|
| | | m_NAtagMCFeastRedPackTaskInfo=tagMCFeastRedPackTaskInfo()
|
| | | ChNetPackDict[eval("0x%02x%02x"%(m_NAtagMCFeastRedPackTaskInfo.Head.Cmd,m_NAtagMCFeastRedPackTaskInfo.Head.SubCmd))] = m_NAtagMCFeastRedPackTaskInfo
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | |
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("Floor", c_int), # 已通关层
|
| | | ("LastFloor", c_int), # 上次挑战层
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | |
| | | self.Cmd = 0xB2
|
| | | self.SubCmd = 0x13
|
| | | self.Floor = 0
|
| | | self.LastFloor = 0
|
| | | return
|
| | |
|
| | | def GetLength(self):
|
| | |
| | | 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
|
| | |
|