mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-28 05:53: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
|
|
@ -340,14 +340,14 @@ void EntitySpawner::setOnlinePlayerEquipment(uint64_t guid,
|
|||
if (st.instanceId == 0 || st.modelId == 0) return;
|
||||
|
||||
if (st.bodySkinPath.empty()) {
|
||||
LOG_WARNING("setOnlinePlayerEquipment: bodySkinPath empty for guid=0x", std::hex, guid, std::dec,
|
||||
LOG_DEBUG("setOnlinePlayerEquipment: bodySkinPath empty for guid=0x", std::hex, guid, std::dec,
|
||||
" instanceId=", st.instanceId, " — skipping equipment");
|
||||
return;
|
||||
}
|
||||
|
||||
int nonZeroDisplay = 0;
|
||||
for (uint32_t d : displayInfoIds) if (d != 0) nonZeroDisplay++;
|
||||
LOG_WARNING("setOnlinePlayerEquipment: guid=0x", std::hex, guid, std::dec,
|
||||
LOG_DEBUG("setOnlinePlayerEquipment: guid=0x", std::hex, guid, std::dec,
|
||||
" instanceId=", st.instanceId, " nonZeroDisplayIds=", nonZeroDisplay,
|
||||
" head=", displayInfoIds[0], " chest=", displayInfoIds[4],
|
||||
" legs=", displayInfoIds[6], " mainhand=", displayInfoIds[15]);
|
||||
|
|
@ -1099,7 +1099,7 @@ void EntitySpawner::spawnOnlineGameObject(uint64_t guid, uint32_t entry, uint32_
|
|||
// (e.g. elevators/lifts). If the server marks it as a transport, always
|
||||
// notify so TransportManager can animate/carry passengers.
|
||||
bool isTG = gameHandler_ && gameHandler_->isTransportGuid(guid);
|
||||
LOG_WARNING("WMO GO spawned: guid=0x", std::hex, guid, std::dec,
|
||||
LOG_DEBUG("WMO GO spawned: guid=0x", std::hex, guid, std::dec,
|
||||
" entry=", entry, " displayId=", displayId,
|
||||
" isTransport=", isTG,
|
||||
" pos=(", x, ", ", y, ", ", z, ")");
|
||||
|
|
@ -1215,7 +1215,7 @@ void EntitySpawner::spawnOnlineGameObject(uint64_t guid, uint32_t entry, uint32_
|
|||
|
||||
// Notify transport system for M2 transports (e.g. Deeprun Tram cars)
|
||||
if (gameHandler_ && gameHandler_->isTransportGuid(guid)) {
|
||||
LOG_WARNING("M2 transport spawned: guid=0x", std::hex, guid, std::dec,
|
||||
LOG_DEBUG("M2 transport spawned: guid=0x", std::hex, guid, std::dec,
|
||||
" entry=", entry, " displayId=", displayId,
|
||||
" instanceId=", instanceId);
|
||||
gameHandler_->notifyTransportSpawned(guid, entry, displayId, x, y, z, orientation);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue