aboutsummaryrefslogtreecommitdiff
path: root/src/tools/extractor_common
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2020-06-14 00:43:02 +0200
committerShauren <shauren.trinity@gmail.com>2020-06-14 00:43:02 +0200
commit83aaa48b85e8ebf04badeb0aaf7aa419372235e7 (patch)
tree7af54ab633aa5d0d69793eba5f1544408e281d14 /src/tools/extractor_common
parent6533de31005fc9680d9f2b61a4d8ea4958fc8edc (diff)
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
Diffstat (limited to 'src/tools/extractor_common')
-rw-r--r--src/tools/extractor_common/CascHandles.cpp9
-rw-r--r--src/tools/extractor_common/CascHandles.h1
2 files changed, 10 insertions, 0 deletions
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);