Core/Spells: Cleanup movement checks in spells - use correct interrupt flags
This commit is contained in:
1 parent
1f60928a51
commit
dfc6fe6450
4 files changed
+41
-39
No files matched your search
@@ -2673,8 +2673,7 @@ void Unit::_UpdateAutoRepeatSpell()
|
||||
|
||||
// check "realtime" interrupts
|
||||
// don't cancel spells which are affected by a SPELL_AURA_CAST_WHILE_WALKING effect
|
||||
if (((GetTypeId() == TYPEID_PLAYER && ToPlayer()->isMoving()) || IsNonMeleeSpellCast(false, false, true, autoRepeatSpellInfo->Id == 75)) &&
|
||||
!HasAuraTypeWithAffectMask(SPELL_AURA_CAST_WHILE_WALKING, m_currentSpells[CURRENT_AUTOREPEAT_SPELL]->m_spellInfo))
|
||||
if ((isMoving() && m_currentSpells[CURRENT_AUTOREPEAT_SPELL]->CheckMovement() != SPELL_CAST_OK) || IsNonMeleeSpellCast(false, false, true, autoRepeatSpellInfo->Id == 75))
|
||||
{
|
||||
// cancel wand shoot
|
||||
if (autoRepeatSpellInfo->Id != 75)
|
||||
@@ -2900,7 +2899,7 @@ bool Unit::IsMovementPreventedByCasting() const
|
||||
// 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())
|
||||
if (spell->GetSpellInfo()->IsMoveAllowedChannel())
|
||||
if (spell->GetSpellInfo()->IsMoveAllowedChannel() || HasAuraTypeWithAffectMask(SPELL_AURA_CAST_WHILE_WALKING, spell->GetSpellInfo()))
|
||||
return false;
|
||||
|
||||
// prohibit movement for all other spell casts
|
||||
|
||||
Reference in new issue
Block a user