From 17c1e3ea3bf19a14beea8656da7972414edf4143 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Sun, 5 Apr 2026 20:41:27 -0700 Subject: [PATCH] fix(entities): add diagnostic for NPC death callback chain --- src/game/entity_controller.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/game/entity_controller.cpp b/src/game/entity_controller.cpp index 2af369de..78a95a31 100644 --- a/src/game/entity_controller.cpp +++ b/src/game/entity_controller.cpp @@ -754,6 +754,9 @@ EntityController::UnitFieldUpdateResult EntityController::applyUnitFieldsOnUpdat unit->setHealth(val); result.healthChanged = true; if (val == 0) { + LOG_WARNING("NPC death: guid=0x", std::hex, block.guid, std::dec, + " type=", static_cast(entity->getType()), + " hasDeathCb=", (owner_.npcDeathCallbackRef() ? 1 : 0)); if (owner_.getCombatHandler() && block.guid == owner_.getCombatHandler()->getAutoAttackTargetGuid()) { owner_.stopAutoAttack(); }