Add debug logging for GameObject spawns to diagnose duplicate cathedral

Added detailed logging in spawnOnlineGameObject() to help identify duplicate
game object spawns. Logs displayId, guid, model path, and position for both
new spawns and position updates. This will help diagnose the floating
cathedral model issue in Stormwind by showing which GUIDs are being spawned
and their coordinates.
This commit is contained in:
Kelsi 2026-02-09 18:04:20 -08:00
parent 1603456120
commit d8002955a3
6 changed files with 406 additions and 0 deletions

40
list_mpq.cpp Normal file
View file

@ -0,0 +1,40 @@
#include <StormLib.h>
#include <iostream>
#include <cstring>
int main(int argc, char** argv) {
if (argc < 2) {
std::cerr << "Usage: " << argv[0] << " <mpq_file> [search_pattern]\n";
return 1;
}
HANDLE hMpq;
if (!SFileOpenArchive(argv[1], 0, 0, &hMpq)) {
std::cerr << "Failed to open MPQ: " << argv[1] << "\n";
return 1;
}
const char* pattern = argc > 2 ? argv[2] : "*";
SFILE_FIND_DATA findData;
HANDLE hFind = SFileFindFirstFile(hMpq, pattern, &findData, nullptr);
if (hFind == nullptr) {
std::cout << "No files found matching: " << pattern << "\n";
} else {
int count = 0;
do {
std::cout << findData.cFileName << " (" << findData.dwFileSize << " bytes)\n";
count++;
if (count > 50) {
std::cout << "... (showing first 50 matches)\n";
break;
}
} while (SFileFindNextFile(hFind, &findData));
SFileFindClose(hFind);
}
SFileCloseArchive(hMpq);
return 0;
}