Fix target switching logic in combat

This commit is contained in:
Liza 2025-01-22 18:38:24 +01:00
parent 05d6394264
commit 5e45af38d1
Signed by: liza
GPG Key ID: 2C41B84815CF6445

View File

@ -157,7 +157,7 @@ internal sealed class CombatController : IDisposable
{
int currentTargetPriority = GetKillPriority(target);
var nextTarget = FindNextTarget();
int nextTargetPriority = GetKillPriority(target);
int nextTargetPriority = nextTarget != null ? GetKillPriority(nextTarget) : 0;
if (nextTarget != null && nextTarget.Equals(target))
{
@ -176,7 +176,7 @@ internal sealed class CombatController : IDisposable
}
else if (nextTarget != null)
{
if (nextTargetPriority > currentTargetPriority)
if (nextTargetPriority > currentTargetPriority || currentTargetPriority == 0)
SetTarget(nextTarget);
}
else