aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Spells/Spell.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 17d8db166ef..8e29980fe83 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -6860,17 +6860,15 @@ SpellCastResult Spell::CheckMovement() const
{
if (!unitCaster->CanCastSpellWhileMoving(m_spellInfo))
{
- if (m_casttime)
+ if (getState() == SPELL_STATE_PREPARING)
{
- if (m_spellInfo->InterruptFlags.HasFlag(SpellInterruptFlags::Movement))
- return SPELL_FAILED_MOVING;
+ if (m_casttime > 0)
+ if (m_spellInfo->InterruptFlags.HasFlag(SpellInterruptFlags::Movement))
+ return SPELL_FAILED_MOVING;
}
- else
- {
- // only fail channeled casts if they are instant but cannot be channeled while moving
- if (m_spellInfo->IsChanneled() && !m_spellInfo->IsMoveAllowedChannel())
+ else if (getState() == SPELL_STATE_CASTING)
+ if (!m_spellInfo->IsMoveAllowedChannel())
return SPELL_FAILED_MOVING;
- }
}
}