diff options
author | Shauren <shauren.trinity@gmail.com> | 2019-06-08 13:19:48 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2019-06-08 17:10:00 +0200 |
commit | bcaaa3d6f69cd60b25a25fc69904f9a8ece24250 (patch) | |
tree | 585dac52b621b55b5f380a8cdc6725b4b2df6129 /src/common/DataStores/DB2FileLoader.h | |
parent | fc330fd8ff0115804d9c4b53a1f810c00dd63de9 (diff) |
Core/DataStores: Updated db2 structures to 8.1.5
Diffstat (limited to 'src/common/DataStores/DB2FileLoader.h')
-rw-r--r-- | src/common/DataStores/DB2FileLoader.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/common/DataStores/DB2FileLoader.h b/src/common/DataStores/DB2FileLoader.h index 0a5edd87873..8442805c64a 100644 --- a/src/common/DataStores/DB2FileLoader.h +++ b/src/common/DataStores/DB2FileLoader.h @@ -27,6 +27,7 @@ struct DB2FieldMeta; struct DB2Meta; #pragma pack(push, 1) + struct DB2Header { uint32 Signature; @@ -49,6 +50,20 @@ struct DB2Header uint32 PalletDataSize; uint32 SectionCount; }; + +struct DB2SectionHeader +{ + uint64 TactId; + uint32 FileOffset; + uint32 RecordCount; + uint32 StringTableSize; + uint32 CatalogDataOffset; + uint32 IdTableSize; + uint32 ParentLookupDataSize; + uint32 CatalogDataCount; + uint32 CopyTableCount; +}; + #pragma pack(pop) struct TC_COMMON_API DB2FieldMeta @@ -146,6 +161,8 @@ public: DB2FileLoader(); ~DB2FileLoader(); + // loadInfo argument is required when trying to read data from the file + bool LoadHeaders(DB2FileSource* source, DB2FileLoadInfo const* loadInfo); bool Load(DB2FileSource* source, DB2FileLoadInfo const* loadInfo); char* AutoProduceData(uint32& count, char**& indexTable, std::vector<char*>& stringPool); char* AutoProduceStrings(char** indexTable, uint32 indexTableSize, uint32 locale); @@ -158,6 +175,8 @@ public: uint32 GetLayoutHash() const { return _header.LayoutHash; } uint32 GetMaxId() const; + DB2Header const& GetHeader() const { return _header; } + DB2SectionHeader const& GetSectionHeader(uint32 section) const; DB2Record GetRecord(uint32 recordNumber) const; DB2RecordCopy GetRecordCopy(uint32 copyNumber) const; |