|  |  |  | 
|---|
|  |  |  | ('PlayerID', ctypes.c_ulong), | 
|---|
|  |  |  | ('FamilyID', ctypes.c_ulong), | 
|---|
|  |  |  | ('RecordType', ctypes.c_ubyte), | 
|---|
|  |  |  | ('RecordResult', ctypes.c_ubyte), | 
|---|
|  |  |  | ('RecordTime', ctypes.c_char * 19), | 
|---|
|  |  |  | ('RecordPrice', ctypes.c_ulong), | 
|---|
|  |  |  | ('BidderPrice', ctypes.c_ulong), | 
|---|
|  |  |  | ('BidderName', ctypes.c_char * 33), | 
|---|
|  |  |  | ('ItemID', ctypes.c_ulong), | 
|---|
|  |  |  | ('Count', ctypes.c_ushort), | 
|---|
|  |  |  | ('UserDataLen', ctypes.c_ushort), | 
|---|
|  |  |  | 
|---|
|  |  |  | self.PlayerID = 0 | 
|---|
|  |  |  | self.FamilyID = 0 | 
|---|
|  |  |  | self.RecordType = 0 | 
|---|
|  |  |  | self.RecordResult = 0 | 
|---|
|  |  |  | self.RecordTime = '' | 
|---|
|  |  |  | self.RecordPrice = 0 | 
|---|
|  |  |  | self.BidderPrice = 0 | 
|---|
|  |  |  | self.BidderName = '' | 
|---|
|  |  |  | self.ItemID = 0 | 
|---|
|  |  |  | self.Count = 0 | 
|---|
|  |  |  | self.UserDataLen = 0 | 
|---|
|  |  |  | 
|---|
|  |  |  | self.PlayerID, pos = CommFunc.ReadDWORD(buf, pos) | 
|---|
|  |  |  | self.FamilyID, pos = CommFunc.ReadDWORD(buf, pos) | 
|---|
|  |  |  | self.RecordType, pos = CommFunc.ReadBYTE(buf, pos) | 
|---|
|  |  |  | self.RecordResult, pos = CommFunc.ReadBYTE(buf, pos) | 
|---|
|  |  |  | self.RecordTime, pos = CommFunc.ReadString(buf, pos, 19) | 
|---|
|  |  |  | self.RecordPrice, pos = CommFunc.ReadDWORD(buf, pos) | 
|---|
|  |  |  | self.BidderPrice, pos = CommFunc.ReadDWORD(buf, pos) | 
|---|
|  |  |  | self.BidderName, pos = CommFunc.ReadString(buf, pos, 33) | 
|---|
|  |  |  | self.ItemID, pos = CommFunc.ReadDWORD(buf, pos) | 
|---|
|  |  |  | self.Count, pos = CommFunc.ReadWORD(buf, pos) | 
|---|
|  |  |  | self.UserDataLen, pos = CommFunc.ReadWORD(buf, pos) | 
|---|
|  |  |  | 
|---|
|  |  |  | buf = CommFunc.WriteDWORD(buf, self.PlayerID) | 
|---|
|  |  |  | buf = CommFunc.WriteDWORD(buf, self.FamilyID) | 
|---|
|  |  |  | buf = CommFunc.WriteBYTE(buf, self.RecordType) | 
|---|
|  |  |  | buf = CommFunc.WriteBYTE(buf, self.RecordResult) | 
|---|
|  |  |  | buf = CommFunc.WriteString(buf, sizeof(ctypes.c_char) * 19, self.RecordTime) | 
|---|
|  |  |  | buf = CommFunc.WriteDWORD(buf, self.RecordPrice) | 
|---|
|  |  |  | buf = CommFunc.WriteDWORD(buf, self.BidderPrice) | 
|---|
|  |  |  | buf = CommFunc.WriteString(buf, sizeof(ctypes.c_char) * 33, self.BidderName) | 
|---|
|  |  |  | buf = CommFunc.WriteDWORD(buf, self.ItemID) | 
|---|
|  |  |  | buf = CommFunc.WriteWORD(buf, self.Count) | 
|---|
|  |  |  | buf = CommFunc.WriteWORD(buf, self.UserDataLen) | 
|---|
|  |  |  | 
|---|
|  |  |  | length += sizeof(ctypes.c_ulong) | 
|---|
|  |  |  | length += sizeof(ctypes.c_ulong) | 
|---|
|  |  |  | length += sizeof(ctypes.c_ubyte) | 
|---|
|  |  |  | length += sizeof(ctypes.c_ubyte) | 
|---|
|  |  |  | length += sizeof(ctypes.c_char) * 19 | 
|---|
|  |  |  | length += sizeof(ctypes.c_ulong) | 
|---|
|  |  |  | length += sizeof(ctypes.c_char) * 33 | 
|---|
|  |  |  | length += sizeof(ctypes.c_ulong) | 
|---|
|  |  |  | length += sizeof(ctypes.c_ushort) | 
|---|
|  |  |  | length += sizeof(ctypes.c_ushort) | 
|---|
|  |  |  | 
|---|
|  |  |  | PlayerID = %s, | 
|---|
|  |  |  | FamilyID = %s, | 
|---|
|  |  |  | RecordType = %s, | 
|---|
|  |  |  | RecordResult = %s, | 
|---|
|  |  |  | RecordTime = %s, | 
|---|
|  |  |  | RecordPrice = %s, | 
|---|
|  |  |  | BidderPrice = %s, | 
|---|
|  |  |  | BidderName = %s, | 
|---|
|  |  |  | ItemID = %s, | 
|---|
|  |  |  | Count = %s, | 
|---|
|  |  |  | UserDataLen = %s, | 
|---|
|  |  |  | 
|---|
|  |  |  | self.PlayerID, | 
|---|
|  |  |  | self.FamilyID, | 
|---|
|  |  |  | self.RecordType, | 
|---|
|  |  |  | self.RecordResult, | 
|---|
|  |  |  | self.RecordTime, | 
|---|
|  |  |  | self.RecordPrice, | 
|---|
|  |  |  | self.BidderPrice, | 
|---|
|  |  |  | self.BidderName, | 
|---|
|  |  |  | self.ItemID, | 
|---|
|  |  |  | self.Count, | 
|---|
|  |  |  | self.UserDataLen, | 
|---|
|  |  |  | 
|---|
|  |  |  | self.RecordTime = Str | 
|---|
|  |  |  | else: | 
|---|
|  |  |  | self.RecordTime = Str[:19] | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def SetBidderName(self,Str): | 
|---|
|  |  |  | if len(Str)<=33: | 
|---|
|  |  |  | self.BidderName = Str | 
|---|
|  |  |  | else: | 
|---|
|  |  |  | self.BidderName = Str[:33] | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | # 拍卖物品表 #tagDBAuctionItem | 
|---|
|  |  |  | 
|---|
|  |  |  | def clear(self): | 
|---|
|  |  |  | memset(addressof(self), 0, self.getLength()) | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def readData(self, buf, pos = 0, length = 0): | 
|---|
|  |  |  | if not pos <= length: | 
|---|
|  |  |  | return -1 | 
|---|
|  |  |  | if len(buf) < pos + self.getLength(): | 
|---|
|  |  |  | return -1 | 
|---|
|  |  |  | self.clear() | 
|---|
|  |  |  | memmove(addressof(self), buf[pos:], self.getLength()) | 
|---|
|  |  |  | self.ZoneID, pos = CommFunc.ReadBYTE(buf, pos) | 
|---|
|  |  |  | self.SeasonID, pos = CommFunc.ReadBYTE(buf, pos) | 
|---|
|  |  |  | self.PlayerID, pos = CommFunc.ReadDWORD(buf, pos) | 
|---|
|  |  |  | self.PlayerName, pos = CommFunc.ReadString(buf, pos, 33) | 
|---|
|  |  |  | self.Job, pos = CommFunc.ReadBYTE(buf, pos) | 
|---|
|  |  |  | self.FightPower, pos = CommFunc.ReadDWORD(buf, pos) | 
|---|
|  |  |  | self.RealmLV, pos = CommFunc.ReadWORD(buf, pos) | 
|---|
|  |  |  | self.PKScore, pos = CommFunc.ReadDWORD(buf, pos) | 
|---|
|  |  |  | self.DanLV, pos = CommFunc.ReadBYTE(buf, pos) | 
|---|
|  |  |  | self.Time, pos = CommFunc.ReadDWORD(buf, pos) | 
|---|
|  |  |  | return self.getLength() | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | self.PlayerName = Str | 
|---|
|  |  |  | else: | 
|---|
|  |  |  | self.PlayerName = Str[:33] | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #仙魔之争记录表#tagDBPyXMZZ | 
|---|
|  |  |  | class tagDBPyXMZZ(Structure): | 
|---|
|  |  |  | 
|---|
|  |  |  | def clear(self): | 
|---|
|  |  |  | memset(addressof(self), 0, self.getLength()) | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def readData(self, buf, pos = 0, length = 0): | 
|---|
|  |  |  | if not pos <= length: | 
|---|
|  |  |  | return -1 | 
|---|
|  |  |  | if len(buf) < pos + self.getLength(): | 
|---|
|  |  |  | return -1 | 
|---|
|  |  |  | self.clear() | 
|---|
|  |  |  | memmove(addressof(self), buf[pos:], self.getLength()) | 
|---|
|  |  |  | self.PlayerID, pos = CommFunc.ReadDWORD(buf, pos) | 
|---|
|  |  |  | self.LineID, pos = CommFunc.ReadBYTE(buf, pos) | 
|---|
|  |  |  | self.Rank, pos = CommFunc.ReadWORD(buf, pos) | 
|---|
|  |  |  | return self.getLength() | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | self.ADOResult, | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return output | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #Boss关注记录表#tagDBPyBossAttention | 
|---|
|  |  |  | 
|---|
|  |  |  | return output | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #交易所物品最近成交单价表#tagDBPyBourseItemLastPrice | 
|---|
|  |  |  | class tagDBPyBourseItemLastPrice(Structure): | 
|---|
|  |  |  | _pack_ = 1 | 
|---|
|  |  |  | 
|---|
|  |  |  | def clear(self): | 
|---|
|  |  |  | memset(addressof(self), 0, self.getLength()) | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def readData(self, buf, pos = 0, length = 0): | 
|---|
|  |  |  | if not pos <= length: | 
|---|
|  |  |  | return -1 | 
|---|
|  |  |  | if len(buf) < pos + self.getLength(): | 
|---|
|  |  |  | return -1 | 
|---|
|  |  |  | self.clear() | 
|---|
|  |  |  | memmove(addressof(self), buf[pos:], self.getLength()) | 
|---|
|  |  |  | self.ItemID, pos = CommFunc.ReadDWORD(buf, pos) | 
|---|
|  |  |  | self.LastPrice, pos = CommFunc.ReadDWORD(buf, pos) | 
|---|
|  |  |  | return self.getLength() | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return output | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #玩家黑名单 #tagDBPyPlayerBlack | 
|---|
|  |  |  | class tagDBPyPlayerBlack(Structure): | 
|---|
|  |  |  | _pack_ = 1 | 
|---|
|  |  |  | 
|---|
|  |  |  | def clear(self): | 
|---|
|  |  |  | memset(addressof(self), 0, self.getLength()) | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def readData(self, buf, pos = 0, length = 0): | 
|---|
|  |  |  | if not pos <= length: | 
|---|
|  |  |  | return -1 | 
|---|
|  |  |  | if len(buf) < pos + self.getLength(): | 
|---|
|  |  |  | return -1 | 
|---|
|  |  |  | self.clear() | 
|---|
|  |  |  | memmove(addressof(self), buf[pos:], self.getLength()) | 
|---|
|  |  |  | self.PlayerID, pos = CommFunc.ReadDWORD(buf, pos) | 
|---|
|  |  |  | self.TagID, pos = CommFunc.ReadDWORD(buf, pos) | 
|---|
|  |  |  | return self.getLength() | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | def clear(self): | 
|---|
|  |  |  | memset(addressof(self), 0, self.getLength()) | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def readData(self, buf, pos = 0, length = 0): | 
|---|
|  |  |  | if not pos <= length: | 
|---|
|  |  |  | return -1 | 
|---|
|  |  |  | if len(buf) < pos + self.getLength(): | 
|---|
|  |  |  | return -1 | 
|---|
|  |  |  | self.clear() | 
|---|
|  |  |  | memmove(addressof(self), buf[pos:], self.getLength()) | 
|---|
|  |  |  | self.PlayerID, pos = CommFunc.ReadDWORD(buf, pos) | 
|---|
|  |  |  | self.TagID, pos = CommFunc.ReadDWORD(buf, pos) | 
|---|
|  |  |  | self.Timestamp, pos = CommFunc.ReadDWORD(buf, pos) | 
|---|
|  |  |  | return self.getLength() | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | def clear(self): | 
|---|
|  |  |  | memset(addressof(self), 0, self.getLength()) | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def readData(self, buf, pos = 0, length = 0): | 
|---|
|  |  |  | if not pos <= length: | 
|---|
|  |  |  | return -1 | 
|---|
|  |  |  | if len(buf) < pos + self.getLength(): | 
|---|
|  |  |  | return -1 | 
|---|
|  |  |  | self.clear() | 
|---|
|  |  |  | memmove(addressof(self), buf[pos:], self.getLength()) | 
|---|
|  |  |  | self.PlayerID, pos = CommFunc.ReadDWORD(buf, pos) | 
|---|
|  |  |  | self.TagID, pos = CommFunc.ReadDWORD(buf, pos) | 
|---|
|  |  |  | return self.getLength() | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | return output | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #玩家仇人表#tagPlayerEnemy | 
|---|
|  |  |  | class tagPlayerEnemy(Structure): | 
|---|
|  |  |  | _pack_ = 1 | 
|---|
|  |  |  | 
|---|
|  |  |  | def clear(self): | 
|---|
|  |  |  | memset(addressof(self), 0, self.getLength()) | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def readData(self, buf, pos = 0, length = 0): | 
|---|
|  |  |  | if not pos <= length: | 
|---|
|  |  |  | return -1 | 
|---|
|  |  |  | if len(buf) < pos + self.getLength(): | 
|---|
|  |  |  | return -1 | 
|---|
|  |  |  | self.clear() | 
|---|
|  |  |  | memmove(addressof(self), buf[pos:], self.getLength()) | 
|---|
|  |  |  | self.PlayerID, pos = CommFunc.ReadDWORD(buf, pos) | 
|---|
|  |  |  | self.TagID, pos = CommFunc.ReadDWORD(buf, pos) | 
|---|
|  |  |  | self.Timestamp, pos = CommFunc.ReadDWORD(buf, pos) | 
|---|
|  |  |  | return self.getLength() | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | return output | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #个人社交总表 #tagPersonalSocial | 
|---|
|  |  |  | class tagPersonalSocial(Structure): | 
|---|
|  |  |  | _pack_ = 1 | 
|---|
|  |  |  | 
|---|
|  |  |  | def clear(self): | 
|---|
|  |  |  | memset(addressof(self), 0, self.getLength()) | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def readData(self, buf, pos = 0, length = 0): | 
|---|
|  |  |  | if not pos <= length: | 
|---|
|  |  |  | return -1 | 
|---|
|  |  |  | if len(buf) < pos + self.getLength(): | 
|---|
|  |  |  | return -1 | 
|---|
|  |  |  | self.clear() | 
|---|
|  |  |  | memmove(addressof(self), buf[pos:], self.getLength()) | 
|---|
|  |  |  | self.PlayerID, pos = CommFunc.ReadDWORD(buf, pos) | 
|---|
|  |  |  | self.PlayerName, pos = CommFunc.ReadString(buf, pos, 33) | 
|---|
|  |  |  | self.Job, pos = CommFunc.ReadBYTE(buf, pos) | 
|---|
|  |  |  | self.LV, pos = CommFunc.ReadWORD(buf, pos) | 
|---|
|  |  |  | self.RealmLV, pos = CommFunc.ReadWORD(buf, pos) | 
|---|
|  |  |  | self.OnlineType, pos = CommFunc.ReadBYTE(buf, pos) | 
|---|
|  |  |  | self.RefCount, pos = CommFunc.ReadDWORD(buf, pos) | 
|---|
|  |  |  | return self.getLength() | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | else: | 
|---|
|  |  |  | self.PlayerName = Str[:33] | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|