mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-04 08:23:50 +00:00
DBC: Correct extracting dbc info
This commit is contained in:
parent
06979e5c5c
commit
bd33601eb3
5 changed files with 258 additions and 4 deletions
|
|
@ -524,7 +524,7 @@ bool Extractor::enumerateFiles(const Options& opts,
|
|||
|
||||
for (auto it = archives.rbegin(); it != archives.rend(); ++it) {
|
||||
HANDLE hMpq = nullptr;
|
||||
if (!SFileOpenArchive(it->path.c_str(), 0, 0, &hMpq)) {
|
||||
if (!SFileOpenArchive(it->path.c_str(), 0, MPQ_OPEN_READ_ONLY, &hMpq)) {
|
||||
std::cerr << " Failed to open: " << it->path << "\n";
|
||||
continue;
|
||||
}
|
||||
|
|
@ -634,8 +634,10 @@ bool Extractor::run(const Options& opts) {
|
|||
std::vector<ThreadArchive> threadHandles;
|
||||
for (const auto& ad : archives) {
|
||||
HANDLE h = nullptr;
|
||||
if (SFileOpenArchive(ad.path.c_str(), 0, 0, &h)) {
|
||||
if (SFileOpenArchive(ad.path.c_str(), 0, MPQ_OPEN_READ_ONLY, &h)) {
|
||||
threadHandles.push_back({h, ad.priority});
|
||||
} else {
|
||||
std::cerr << "Worker: failed to open " << ad.path << " (err=" << GetLastError() << ")\n";
|
||||
}
|
||||
}
|
||||
if (threadHandles.empty()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue