fix(Core/Misc): Consider /dance as an emote state. (#14275)

This commit is contained in:
UltraNix 2022-12-22 07:38:09 +01:00 committed by GitHub
parent 20c9e80d4a
commit 962cefdcd8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 0 deletions

View file

@ -14464,6 +14464,9 @@ void Unit::setDeathState(DeathState s, bool despawn)
SetHealth(0);
SetPower(getPowerType(), 0);
// Stop emote on death
SetUInt32Value(UNIT_NPC_EMOTESTATE, 0);
// players in instance don't have ZoneScript, but they have InstanceScript
if (ZoneScript* zoneScript = GetZoneScript() ? GetZoneScript() : (ZoneScript*)GetInstanceScript())
zoneScript->OnUnitDeath(this);