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:
1 parent
cdad0e3920
commit
148291729f
12 files changed
+92
-94
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user