Core/Creatures: Improved movement interruption while casting spells

This commit is contained in:
Meji authored and Ovahlord committed 2023-10-21 20:41:40 +02:00
1 parent 3c0cf32b43
commit 56077b35c3
3 files changed
+12 -16

No files matched your search

+2 -1
View File
@@ -2892,7 +2892,8 @@ bool Unit::IsMovementPreventedByCasting() const
return false;
if (Spell* spell = m_currentSpells[CURRENT_GENERIC_SPELL])
if (HasAuraTypeWithAffectMask(SPELL_AURA_CAST_WHILE_WALKING, spell->GetSpellInfo()))
if (HasAuraTypeWithAffectMask(SPELL_AURA_CAST_WHILE_WALKING, spell->GetSpellInfo()) || spell->getState() == SPELL_STATE_FINISHED ||
!spell->m_spellInfo->InterruptFlags.HasFlag(SpellInterruptFlags::Movement))
return false;
// channeled spells during channel stage (after the initial cast timer) allow movement with a specific spell attribute