Add diagnostic logging for player appearance extraction failures

Log a warning when player model spawn fails due to appearance data extraction failure.
This helps diagnose why players appear invisible (missing field indices or malformed
update packets). Logs at both CREATE_OBJECT and VALUES update points.
This commit is contained in:
Kelsi 2026-03-11 17:12:05 -07:00
parent b7479cbb50
commit b5a48729b8

View file

@ -8404,6 +8404,9 @@ void GameHandler::handleUpdateObject(network::Packet& packet) {
playerSpawnCallback_(block.guid, unit->getDisplayId(), race, gender,
appearanceBytes, facial,
unit->getX(), unit->getY(), unit->getZ(), unit->getOrientation());
} else {
LOG_WARNING("[Spawn] PLAYER guid=0x", std::hex, block.guid, std::dec,
" displayId=", unit->getDisplayId(), " appearance extraction failed — model will not render");
}
}
} else if (creatureSpawnCallback_) {
@ -8800,6 +8803,9 @@ void GameHandler::handleUpdateObject(network::Packet& packet) {
playerSpawnCallback_(block.guid, unit->getDisplayId(), race, gender,
appearanceBytes, facial,
unit->getX(), unit->getY(), unit->getZ(), unit->getOrientation());
} else {
LOG_WARNING("[Spawn] PLAYER guid=0x", std::hex, block.guid, std::dec,
" displayId=", unit->getDisplayId(), " appearance extraction failed (VALUES update) — model will not render");
}
}
} else if (creatureSpawnCallback_) {