diff options
author | Wyrserth <43747507+Wyrserth@users.noreply.github.com> | 2019-06-15 15:03:09 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2021-12-11 13:06:44 +0100 |
commit | 264373bb656352a0cdf9b18bad4f3929c7376a9c (patch) | |
tree | 9e56765ba2aad153fddc5b3ec7b299eb7cc91ac7 | |
parent | 7a8d15d63bb1178457df25f37a29e020e5183631 (diff) |
Core/Creature: prevent dead creatures from setting a focus target, so they won't turn when hit by certain spells. (#23367)
(cherry picked from commit 0a24a6571b7065d66afe52fc7b0b00f6366272bf)
-rw-r--r-- | src/server/game/Entities/Creature/Creature.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index 32094b774fa..3a0516ed6fa 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -3175,6 +3175,10 @@ void Creature::FocusTarget(Spell const* focusSpell, WorldObject const* target) if (m_focusSpell) return; + // Prevent dead creatures from setting a focus target, so they won't turn + if (!IsAlive()) + return; + // some spells shouldn't track targets if (focusSpell->IsFocusDisabled()) return; |