diff options
author | Shauren <shauren.trinity@gmail.com> | 2023-02-03 13:36:21 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2023-02-03 13:36:21 +0100 |
commit | 65adaf8c430c61c70eb46c2830ec29f7c9d483e1 (patch) | |
tree | 393ce059201617b4f899338011f4b88dd1ec9549 /src/tools/extractor_common | |
parent | 03837b252579bdacdb8a128e52a12a748855e2fe (diff) |
Tools/Extractors: Fixed remote mode after casclib upgrade
Diffstat (limited to 'src/tools/extractor_common')
-rw-r--r-- | src/tools/extractor_common/CascHandles.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/tools/extractor_common/CascHandles.cpp b/src/tools/extractor_common/CascHandles.cpp index c6de59cda38..d06bc7ed74e 100644 --- a/src/tools/extractor_common/CascHandles.cpp +++ b/src/tools/extractor_common/CascHandles.cpp @@ -185,18 +185,23 @@ CASC::Storage* CASC::Storage::Open(boost::filesystem::path const& path, uint32 l Storage* storage = new Storage(handle); if (!storage->LoadOnlineTactKeys()) - printf("Failed to load additional encryption keys from wow.tools, some files might not be extracted.\n"); + printf("Failed to load additional online encryption keys, some files might not be extracted.\n"); return storage; } CASC::Storage* CASC::Storage::OpenRemote(boost::filesystem::path const& path, uint32 localeMask, char const* product, char const* region) { - HANDLE handle = nullptr; - std::string cacheArgument = std::string(path.string() + ":" + product + ":" + region); + std::string strPath = path.string(); + CASC_OPEN_STORAGE_ARGS args = {}; + args.Size = sizeof(CASC_OPEN_STORAGE_ARGS); + args.szLocalPath = strPath.c_str(); + args.szCodeName = product; + args.szRegion = region; + args.dwLocaleMask = localeMask; - printf("Open casc remote storage...\n"); - if (!::CascOpenOnlineStorage(cacheArgument.c_str(), localeMask, &handle)) + HANDLE handle = nullptr; + if (!::CascOpenStorageEx(nullptr, &args, true, &handle)) { DWORD lastError = GetCascError(); // support checking error set by *Open* call, not the next *Close* printf("Error opening remote casc storage: %s\n", HumanReadableCASCError(lastError)); @@ -205,10 +210,11 @@ CASC::Storage* CASC::Storage::OpenRemote(boost::filesystem::path const& path, ui return nullptr; } + printf("Opened remote casc storage '%s'\n", path.string().c_str()); Storage* storage = new Storage(handle); if (!storage->LoadOnlineTactKeys()) - printf("Failed to load additional encryption keys from wow.tools, some files might not be extracted.\n"); + printf("Failed to load additional online encryption keys, some files might not be extracted.\n"); return storage; } |