Core/Creatures: Restore IsMovementPreventedByCasting logic for casting units (non-channeled)

* this partly reverts e2ed3e23f8
This commit is contained in:
ModoX
2023-01-09 23:14:21 +01:00
parent e2ed3e23f8
commit 25c7656ffd

View File

@@ -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;
}