From 7d67f10f770d7f3e1d7b05e57407ec922aab49ea Mon Sep 17 00:00:00 2001 From: Ovahlord Date: Mon, 3 Oct 2022 12:22:39 +0200 Subject: [PATCH] Core/Spells: added a missing check in Unit::IsMovementPreventedByCasting --- src/server/game/Entities/Unit/Unit.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 3bb6c1c9cf..9d601f0560 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -2894,6 +2894,10 @@ bool Unit::IsMovementPreventedByCasting() const if (!HasUnitState(UNIT_STATE_CASTING)) return false; + if (Spell* spell = m_currentSpells[CURRENT_GENERIC_SPELL]) + if (HasAuraTypeWithAffectMask(SPELL_AURA_CAST_WHILE_WALKING, spell->GetSpellInfo())) + return false; + // channeled spells during channel stage (after the initial cast timer) allow movement with a specific spell attribute if (Spell* spell = m_currentSpells[CURRENT_CHANNELED_SPELL]) if (spell->getState() != SPELL_STATE_FINISHED && spell->IsChannelActive())