Core/Spells: ported focusing rework and fixed an additional issue that was causing channeled spells getting interrupted when being cast within the focus delay release time

This commit is contained in:
Ovahlord committed 2019-08-10 23:43:15 +02:00
1 parent cdad0e3920
commit 148291729f
12 files changed
+92 -94

No files matched your search

+2 -2
View File
@@ -3247,7 +3247,7 @@ bool Unit::IsMovementPreventedByCasting() const
if (spell->GetSpellInfo()->IsMoveAllowedChannel())
return false;
if (const_cast<Unit*>(this)->IsFocusing(nullptr, true))
if (const_cast<Unit*>(this)->HasSpellFocus())
return false;
// prohibit movement for all other spell casts
@@ -9427,7 +9427,7 @@ Unit* Creature::SelectVictim()
if (target && _IsTargetAcceptable(target) && CanCreatureAttack(target))
{
if (!IsFocusing())
if (!HasSpellFocus())
SetInFront(target);
return target;
}