mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 17:43:52 +00:00
fix(entities): add diagnostic for NPC death callback chain
This commit is contained in:
parent
7f9eed0de9
commit
17c1e3ea3b
1 changed files with 3 additions and 0 deletions
|
|
@ -754,6 +754,9 @@ EntityController::UnitFieldUpdateResult EntityController::applyUnitFieldsOnUpdat
|
||||||
unit->setHealth(val);
|
unit->setHealth(val);
|
||||||
result.healthChanged = true;
|
result.healthChanged = true;
|
||||||
if (val == 0) {
|
if (val == 0) {
|
||||||
|
LOG_WARNING("NPC death: guid=0x", std::hex, block.guid, std::dec,
|
||||||
|
" type=", static_cast<int>(entity->getType()),
|
||||||
|
" hasDeathCb=", (owner_.npcDeathCallbackRef() ? 1 : 0));
|
||||||
if (owner_.getCombatHandler() && block.guid == owner_.getCombatHandler()->getAutoAttackTargetGuid()) {
|
if (owner_.getCombatHandler() && block.guid == owner_.getCombatHandler()->getAutoAttackTargetGuid()) {
|
||||||
owner_.stopAutoAttack();
|
owner_.stopAutoAttack();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue