Core/Spells: reverted an wrong change for channeling spells

This commit is contained in:
Ovalord committed 2018-02-08 21:12:11 +01:00
1 parent 0c8689ffff
commit 420a2523b5
1 file changed
+5 -5
+5 -5
View File
@@ -3113,17 +3113,17 @@ int32 Unit::GetCurrentSpellCastTime(uint32 spell_id) const
bool Unit::IsMovementPreventedByCasting() const
{
// can always move when not casting
if (HasUnitState(UNIT_STATE_CASTING))
return true;
if (!HasUnitState(UNIT_STATE_CASTING))
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())
if (!spell->GetSpellInfo()->IsMoveAllowedChannel())
return true;
if (spell->GetSpellInfo()->IsMoveAllowedChannel())
return false;
// prohibit movement for all other spell casts
return false;
return true;
}
bool Unit::isInFrontInMap(Unit const* target, float distance, float arc) const