aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMeji <alvaro.megias@outlook.com>2023-11-10 22:01:27 +0100
committerGitHub <noreply@github.com>2023-11-10 22:01:27 +0100
commitc05466fa0c2dc9b07528ed967d77bf0313fdafff (patch)
treed884cbb43182842df978b2056c5530e424f12e62 /src
parent2e4eecf96c616791707f9f1206eb4f8672b0e33f (diff)
Core/Creatures: Remove stand state when a creature attacks or dies (#29396)
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index d16798ec6a5..950db3570b1 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -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())