Core/Creatures: Improved movement interruption while casting spells

Port From (https://github.com/TrinityCore/TrinityCore/commit/cc57c9dad59a2eded2f7ea0471aa79c89b390559)
This commit is contained in:
hondacrx
2023-04-05 08:03:07 -04:00
parent 6b8dc37d3c
commit 1cf184978e
2 changed files with 8 additions and 1 deletions
+2 -1
View File
@@ -1047,7 +1047,8 @@ namespace Game.Entities
Spell spell = GetCurrentSpell(CurrentSpellTypes.Generic);
if (spell != null)
if (CanCastSpellWhileMoving(spell.GetSpellInfo()))
if (CanCastSpellWhileMoving(spell.GetSpellInfo()) || spell.GetState() == SpellState.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