Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
fix: changing targetself NoNewHostiles Settings.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Jan 26, 2023
1 parent 58c2997 commit 2d2e6fd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion RotationSolver/Actions/BaseAction/BaseAction_Target.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using RotationSolver.Updaters;
using System;
using System.Collections.Generic;
using System.Diagnostics.Metrics;
using System.Linq;
using System.Numerics;

Expand Down Expand Up @@ -329,7 +330,10 @@ private bool TargetSelf(bool mustUse, int aoeCount)
{
if (!Service.Configuration.UseAOEWhenManual && !mustUse) return false;
}
return GetMostObjects(TargetFilterFuncEot(TargetUpdater.HostileTargets, mustUse), aoeCount).Any();

var tars = TargetFilter.GetObjectInRadius(TargetFilterFuncEot(TargetUpdater.HostileTargets, mustUse), aoeCount);
if (tars.Count() < aoeCount) return false;
if (Service.Configuration.NoNewHostiles && tars.Any(t => t.TargetObject == null)) return false;
}
return true;
}
Expand Down

0 comments on commit 2d2e6fd

Please sign in to comment.