Core/Spells: Cleanup movement checks in spells - use correct interrupt flags
Port From (https://github.com/TrinityCore/TrinityCore/commit/538fa8e97ff4b4e36a59e37fd74ea8958e6e30d2)
This commit is contained in:
@@ -1058,7 +1058,7 @@ namespace Game.Entities
|
||||
spell = m_currentSpells.LookupByKey(CurrentSpellTypes.Channeled);
|
||||
if (spell != null)
|
||||
if (spell.GetState() != SpellState.Finished && spell.IsChannelActive())
|
||||
if (spell.GetSpellInfo().IsMoveAllowedChannel())
|
||||
if (spell.GetSpellInfo().IsMoveAllowedChannel() || CanCastSpellWhileMoving(spell.GetSpellInfo()))
|
||||
return false;
|
||||
|
||||
// prohibit movement for all other spell casts
|
||||
|
||||
@@ -1563,8 +1563,7 @@ namespace Game.Entities
|
||||
|
||||
// check "realtime" interrupts
|
||||
// don't cancel spells which are affected by a SPELL_AURA_CAST_WHILE_WALKING effect
|
||||
if (((IsTypeId(TypeId.Player) && ToPlayer().IsMoving()) || IsNonMeleeSpellCast(false, false, true, autoRepeatSpellInfo.Id == 75)) &&
|
||||
!CanCastSpellWhileMoving(autoRepeatSpellInfo))
|
||||
if ((IsMoving() && GetCurrentSpell(CurrentSpellTypes.AutoRepeat).CheckMovement() != SpellCastResult.SpellCastOk) || IsNonMeleeSpellCast(false, false, true, autoRepeatSpellInfo.Id == 75))
|
||||
{
|
||||
// cancel wand shoot
|
||||
if (autoRepeatSpellInfo.Id != 75)
|
||||
|
||||
Reference in New Issue
Block a user