Fix quest required item display and add NPC spawn diagnostics

- Fix SMSG_QUESTGIVER_REQUEST_ITEMS: read emoteDelay(u32)+emoteId(u32)+autoFinish(u8)
  instead of 5 uint32s — the 11-byte over-read corrupted requiredMoney, itemCount,
  and all item data (itemId/count/displayInfoId)
- Fix garbled CSV fallback in asset_manager: return nullptr instead of silently
  returning garbled DBC data when binary fallback is unavailable
- Add NPC spawn diagnostics: log when UNIT blocks have displayId=0 (wrong field index)
  and when spawn callback fires with displayId + position
- Improve getModelPathForDisplayId failure logging: distinguish displayDataMap_ miss
  vs modelIdToPath_ miss, and include map sizes for context
This commit is contained in:
Kelsi 2026-02-17 17:15:48 -08:00
parent 30efc59fff
commit eebc0007a6
4 changed files with 26 additions and 26 deletions

View file

@ -2950,11 +2950,18 @@ std::string Application::getModelPathForDisplayId(uint32_t displayId) const {
}
if (displayId == 30412) return "Creature\\Gryphon\\Gryphon.m2";
if (displayId == 30413) return "Creature\\Wyvern\\Wyvern.m2";
LOG_WARNING("No display data for displayId ", displayId,
" (displayDataMap_ has ", displayDataMap_.size(), " entries)");
return "";
}
auto itPath = modelIdToPath_.find(itData->second.modelId);
if (itPath == modelIdToPath_.end()) return "";
if (itPath == modelIdToPath_.end()) {
LOG_WARNING("No model path for modelId ", itData->second.modelId,
" from displayId ", displayId,
" (modelIdToPath_ has ", modelIdToPath_.size(), " entries)");
return "";
}
return itPath->second;
}