Upgrade displayId=0 creature spawn skip to WARNING level

Makes it visible in logs when a creature entity spawns without a
display ID, which would cause it to be invisible but still active.
This commit is contained in:
Kelsi 2026-02-23 05:11:35 -08:00
parent 30e9998a86
commit e98450f283

View file

@ -4984,8 +4984,9 @@ void GameHandler::handleUpdateObject(network::Packet& packet) {
}
// Trigger creature spawn callback for units/players with displayId
if (block.objectType == ObjectType::UNIT && unit->getDisplayId() == 0) {
LOG_DEBUG("[Spawn] UNIT guid=0x", std::hex, block.guid, std::dec,
" has displayId=0 — no spawn (entry=", unit->getEntry(), ")");
LOG_WARNING("[Spawn] UNIT guid=0x", std::hex, block.guid, std::dec,
" has displayId=0 — no spawn (entry=", unit->getEntry(),
" at ", unit->getX(), ",", unit->getY(), ",", unit->getZ(), ")");
}
if ((block.objectType == ObjectType::UNIT || block.objectType == ObjectType::PLAYER) && unit->getDisplayId() != 0) {
if (block.objectType == ObjectType::PLAYER && block.guid == playerGuid) {