From b5a48729b8c82bd47a90ec8e44f31364c6850e40 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Wed, 11 Mar 2026 17:12:05 -0700 Subject: [PATCH] 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. --- src/game/game_handler.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/game/game_handler.cpp b/src/game/game_handler.cpp index 0e687db5..df0caa62 100644 --- a/src/game/game_handler.cpp +++ b/src/game/game_handler.cpp @@ -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_) {