mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Creatures: Restore IsMovementPreventedByCasting logic for casting units (non-channeled)
* this partly reverts e2ed3e23f8
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user