mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-25 21:03:51 +00:00
fix(parsing): bail on suspicious maskBlockCount in CREATE_OBJECT blocks
When spline parsing consumes the wrong number of bytes, the subsequent blockCount read lands on garbage data (e.g. 71 instead of ~5 for UNIT). Previously the parser logged a warning but continued, reading garbage mask/field data until hitting truncation. Now it returns false for CREATE_OBJECT blocks with suspicious counts, letting the block loop skip cleanly to the next entity. Also downgrade ~44 diagnostic LOG_WARNING messages to LOG_DEBUG across 17 files (equipment, transport, DBC, heartbeat, chat, GO raypick, etc.) to reduce log noise and make real warnings visible.
This commit is contained in:
parent
e32f4fbff9
commit
069dd36698
18 changed files with 46 additions and 43 deletions
|
|
@ -174,7 +174,7 @@ void WorldLoader::processPendingEntry() {
|
|||
if (!pendingWorldEntry_ || loadingWorld_) return;
|
||||
auto entry = *pendingWorldEntry_;
|
||||
pendingWorldEntry_.reset();
|
||||
LOG_WARNING("Processing deferred world entry: map ", entry.mapId);
|
||||
LOG_DEBUG("Processing deferred world entry: map ", entry.mapId);
|
||||
if (app_.worldEntryCallbacks_) {
|
||||
app_.worldEntryCallbacks_->setWorldEntryMovementGraceTimer(2.0f);
|
||||
app_.worldEntryCallbacks_->setTaxiLandingClampTimer(0.0f);
|
||||
|
|
@ -250,7 +250,7 @@ void WorldLoader::loadOnlineWorldTerrain(uint32_t mapId, float x, float y, float
|
|||
|
||||
// --- Clean up previous map's state on map change ---
|
||||
// (Same cleanup as logout, but preserves player identity and renderer objects.)
|
||||
LOG_WARNING("loadOnlineWorldTerrain: mapId=", mapId, " loadedMapId_=", loadedMapId_);
|
||||
LOG_DEBUG("loadOnlineWorldTerrain: mapId=", mapId, " loadedMapId_=", loadedMapId_);
|
||||
bool hasRendererData = renderer_ && (renderer_->getWMORenderer() || renderer_->getM2Renderer());
|
||||
if (loadedMapId_ != 0xFFFFFFFF || hasRendererData) {
|
||||
LOG_WARNING("Map change: cleaning up old map ", loadedMapId_, " before loading map ", mapId);
|
||||
|
|
@ -448,12 +448,12 @@ void WorldLoader::loadOnlineWorldTerrain(uint32_t mapId, float x, float y, float
|
|||
pipeline::WDTInfo wdtInfo;
|
||||
{
|
||||
std::string wdtPath = "World\\Maps\\" + mapName + "\\" + mapName + ".wdt";
|
||||
LOG_WARNING("Reading WDT: ", wdtPath);
|
||||
LOG_DEBUG("Reading WDT: ", wdtPath);
|
||||
std::vector<uint8_t> wdtData = assetManager_->readFile(wdtPath);
|
||||
if (!wdtData.empty()) {
|
||||
wdtInfo = pipeline::parseWDT(wdtData);
|
||||
isWMOOnlyMap = wdtInfo.isWMOOnly() && !wdtInfo.rootWMOPath.empty();
|
||||
LOG_WARNING("WDT result: isWMOOnly=", isWMOOnlyMap, " rootWMO='", wdtInfo.rootWMOPath, "'");
|
||||
LOG_DEBUG("WDT result: isWMOOnly=", isWMOOnlyMap, " rootWMO='", wdtInfo.rootWMOPath, "'");
|
||||
} else {
|
||||
LOG_WARNING("No WDT file found at ", wdtPath);
|
||||
}
|
||||
|
|
@ -954,7 +954,7 @@ void WorldLoader::loadOnlineWorldTerrain(uint32_t mapId, float x, float y, float
|
|||
// If a new world entry was deferred during packet processing,
|
||||
// stop warming up this map — we'll load the new one after cleanup.
|
||||
if (pendingWorldEntry_) {
|
||||
LOG_WARNING("loadOnlineWorldTerrain(map ", mapId,
|
||||
LOG_DEBUG("loadOnlineWorldTerrain(map ", mapId,
|
||||
") — deferred world entry pending, stopping warmup");
|
||||
break;
|
||||
}
|
||||
|
|
@ -1021,7 +1021,7 @@ void WorldLoader::loadOnlineWorldTerrain(uint32_t mapId, float x, float y, float
|
|||
if (auto* tm = renderer_->getTerrainManager()) {
|
||||
if (tm->getLoadedTileCount() >= 4) {
|
||||
groundReady = true;
|
||||
LOG_WARNING("Warmup: using tile-count fallback (", tm->getLoadedTileCount(), " tiles) after ", elapsed, "s");
|
||||
LOG_DEBUG("Warmup: using tile-count fallback (", tm->getLoadedTileCount(), " tiles) after ", elapsed, "s");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1078,7 +1078,7 @@ void WorldLoader::loadOnlineWorldTerrain(uint32_t mapId, float x, float y, float
|
|||
if (pendingWorldEntry_) {
|
||||
auto entry = *pendingWorldEntry_;
|
||||
pendingWorldEntry_.reset();
|
||||
LOG_WARNING("Processing deferred world entry: map ", entry.mapId);
|
||||
LOG_DEBUG("Processing deferred world entry: map ", entry.mapId);
|
||||
if (app_.worldEntryCallbacks_) {
|
||||
app_.worldEntryCallbacks_->setWorldEntryMovementGraceTimer(2.0f);
|
||||
app_.worldEntryCallbacks_->setTaxiLandingClampTimer(0.0f);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue