Skip to content

Commit

Permalink
Merge pull request #51 from FFXIV-CombatReborn/autotargeting-fixes
Browse files Browse the repository at this point in the history
Fixes auto targeting
  • Loading branch information
NostraThomas99 authored Apr 3, 2024
2 parents 2936b9d + 9e297e1 commit 8ac14f4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions RotationSolver.Basic/Actions/ActionTargetInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -694,13 +694,13 @@ private readonly bool CanGetTarget(GameObject target, GameObject subTarget)

BattleChara? FindHostileRaw()
{
gameObjects = type switch
gameObjects = DataCenter.TargetingType switch
{
TargetType.Small => gameObjects.OrderBy(p => p.HitboxRadius),
TargetType.HighHP => gameObjects.OrderByDescending(p => p is BattleChara b ? b.CurrentHp : 0),
TargetType.LowHP => gameObjects.OrderBy(p => p is BattleChara b ? b.CurrentHp : 0),
TargetType.HighMaxHP => gameObjects.OrderByDescending(p => p is BattleChara b ? b.MaxHp : 0),
TargetType.LowMaxHP => gameObjects.OrderBy(p => p is BattleChara b ? b.MaxHp : 0),
TargetingType.Small => gameObjects.OrderBy(p => p.HitboxRadius),
TargetingType.HighHP => gameObjects.OrderByDescending(p => p is BattleChara b ? b.CurrentHp : 0),
TargetingType.LowHP => gameObjects.OrderBy(p => p is BattleChara b ? b.CurrentHp : 0),
TargetingType.HighMaxHP => gameObjects.OrderByDescending(p => p is BattleChara b ? b.MaxHp : 0),
TargetingType.LowMaxHP => gameObjects.OrderBy(p => p is BattleChara b ? b.MaxHp : 0),
_ => gameObjects.OrderByDescending(p => p.HitboxRadius),
};
return gameObjects.FirstOrDefault();
Expand Down

0 comments on commit 8ac14f4

Please sign in to comment.