diff options
author | ModoX <moardox@gmail.com> | 2023-01-09 23:14:21 +0100 |
---|---|---|
committer | ModoX <moardox@gmail.com> | 2023-01-09 23:15:21 +0100 |
commit | 25c7656ffd1f63a32a7f92fde1dc1649fcfd1323 (patch) | |
tree | 4b48151a6b8bece382e1b8b4329f19c3b33e40cc /src | |
parent | e2ed3e23f8241933b4f931e9def7eee69f1abb79 (diff) |
Core/Creatures: Restore IsMovementPreventedByCasting logic for casting units (non-channeled)
* this partly reverts e2ed3e23f8241933b4f931e9def7eee69f1abb79
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Entities/Creature/Creature.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index c0c65a43061..57ff7b1a0a7 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -3389,10 +3389,6 @@ void Creature::DoNotReacquireSpellFocusTarget() bool Creature::IsMovementPreventedByCasting() const { - // Can always move when not casting - if (!HasUnitState(UNIT_STATE_CASTING)) - return false; - // first check if currently a movement allowed channel is active and we're not casting if (Spell* spell = m_currentSpells[CURRENT_CHANNELED_SPELL]) { @@ -3404,6 +3400,9 @@ bool Creature::IsMovementPreventedByCasting() const if (HasSpellFocus()) return true; + if (HasUnitState(UNIT_STATE_CASTING)) + return true; + return false; } |