| | |
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # 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
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|
| | | # B9 13 进入组队副本失败原因 #tagGCEnterTeamFBFailReason
|
| | |
|
| | | class tagGCEnterTeamFBFailReason(Structure):
|
| | |
| | |
|
| | | 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
|
| | |
|
| | |
|
| | | #------------------------------------------------------
|