fix(Core/AI): Prevent guardians from switching targets on owner combat interaction (#25190)
Co-authored-by: blinkysc <blinkysc@users.noreply.github.com>
This commit is contained in:
@@ -198,6 +198,10 @@ void CreatureAI::OnOwnerCombatInteraction(Unit* target)
|
|||||||
if (!target || !me->IsAlive())
|
if (!target || !me->IsAlive())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// Prevent guardian from disengaging from current target
|
||||||
|
if (me->GetVictim() && me->GetVictim()->IsAlive())
|
||||||
|
return;
|
||||||
|
|
||||||
if (!me->HasReactState(REACT_PASSIVE) && me->CanStartAttack(target, true))
|
if (!me->HasReactState(REACT_PASSIVE) && me->CanStartAttack(target, true))
|
||||||
AttackStart(target);
|
AttackStart(target);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user