Core/Creatures: Remove stand state when a creature attacks or dies (#29396)

This commit is contained in:
Meji
2023-11-10 22:01:27 +01:00
committed by GitHub
parent 2e4eecf96c
commit c05466fa0c

View File

@@ -5670,8 +5670,9 @@ bool Unit::Attack(Unit* victim, bool meleeAttack)
creature->SendAIReaction(AI_REACTION_HOSTILE);
creature->CallAssistance();
// Remove emote state - will be restored on creature reset
// Remove emote and stand state - will be restored on creature reset
SetEmoteState(EMOTE_ONESHOT_NONE);
SetStandState(UNIT_STAND_STATE_STAND);
}
// delay offhand weapon attack by 50% of the base attack time
@@ -8506,6 +8507,7 @@ void Unit::setDeathState(DeathState s)
SetHealth(0);
SetPower(GetPowerType(), 0);
SetEmoteState(EMOTE_ONESHOT_NONE);
SetStandState(UNIT_STAND_STATE_STAND);
// players in instance don't have ZoneScript, but they have InstanceScript
if (ZoneScript* zoneScript = GetZoneScript() ? GetZoneScript() : GetInstanceScript())