From 83aaa48b85e8ebf04badeb0aaf7aa419372235e7 Mon Sep 17 00:00:00 2001 From: Shauren Date: Sun, 14 Jun 2020 00:43:02 +0200 Subject: Tools/vmap extractor: Various fixes * Fixed output file name case normalization - exclude names built from file ids (starting with FILE) * Skip antiportal WMO groups Closes #23972 Closes #24798 --- src/tools/extractor_common/CascHandles.cpp | 9 +++++++++ src/tools/extractor_common/CascHandles.h | 1 + 2 files changed, 10 insertions(+) (limited to 'src/tools/extractor_common') diff --git a/src/tools/extractor_common/CascHandles.cpp b/src/tools/extractor_common/CascHandles.cpp index 0bf05109140..d4d1cd28da6 100644 --- a/src/tools/extractor_common/CascHandles.cpp +++ b/src/tools/extractor_common/CascHandles.cpp @@ -158,6 +158,15 @@ CASC::File::~File() ::CascCloseFile(_handle); } +uint32 CASC::File::GetId() const +{ + CASC_FILE_FULL_INFO info; + if (!::CascGetFileInfo(_handle, CascFileFullInfo, &info, sizeof(info), nullptr)) + return CASC_INVALID_ID; + + return info.FileDataId; +} + int64 CASC::File::GetSize() const { ULONGLONG size; diff --git a/src/tools/extractor_common/CascHandles.h b/src/tools/extractor_common/CascHandles.h index 69be8073a6f..357d39a124e 100644 --- a/src/tools/extractor_common/CascHandles.h +++ b/src/tools/extractor_common/CascHandles.h @@ -64,6 +64,7 @@ namespace CASC public: ~File(); + uint32 GetId() const; int64 GetSize() const; int64 GetPointer() const; bool SetPointer(int64 position); -- cgit v1.2.3