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

Commit

Permalink
fix: fixed the relationship between AllTargetsCanAttack and `NoHost…
Browse files Browse the repository at this point in the history
…ileNames`.
  • Loading branch information
ArchiDog1998 committed Oct 25, 2023
1 parent 387565b commit 0d03263
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Resources/RotationSolverRecord.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"ClickingCount": 17599,
"ClickingCount": 19142,
"SaidUsers": []
}
12 changes: 5 additions & 7 deletions RotationSolver/Updaters/TargetUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,15 +163,8 @@ private unsafe static void UpdateHostileTargets(IEnumerable<BattleChara> allTarg
private static IEnumerable<BattleChara> GetHostileTargets(IEnumerable<BattleChara> allAttackableTargets)
{
var type = DataCenter.RightNowTargetToHostileType;
if (type == TargetHostileType.AllTargetsCanAttack || Service.CountDownTime > 0)
{
return allAttackableTargets;
}

uint[] ids = GetEnemies();

var fateId = DataCenter.FateId;

allAttackableTargets = allAttackableTargets.Where(b =>
{
if (Svc.ClientState == null) return false;
Expand All @@ -189,7 +182,12 @@ private static IEnumerable<BattleChara> GetHostileTargets(IEnumerable<BattleChar
return tarFateId == 0 || tarFateId == fateId;
});

if (type == TargetHostileType.AllTargetsCanAttack || Service.CountDownTime > 0)
{
return allAttackableTargets;
}

uint[] ids = GetEnemies();
var hostiles = allAttackableTargets.Where(t =>
{
if (ids.Contains(t.ObjectId)) return true;
Expand Down

0 comments on commit 0d03263

Please sign in to comment.