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

Commit

Permalink
fix: fixed manual target thing.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Feb 25, 2024
1 parent 8635306 commit 6a5998c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Resources/RotationSolverRecord.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"ClickingCount": 77120,
"SayingHelloCount": 66,
"ClickingCount": 77828,
"SayingHelloCount": 67,
"SaidUsers": []
}
2 changes: 1 addition & 1 deletion RotationSolver.Basic/Actions/ActionTargetInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ private readonly bool CheckTimeToKill(GameObject gameObject)
{
var t = Svc.Targets.Target as BattleChara;

if (t == null) return null;
if (t == null || !_action.Setting.CanTarget(t)) return null;

if (type == TargetType.Move)
{
Expand Down
6 changes: 5 additions & 1 deletion RotationSolver.Basic/Actions/BaseAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ public ActionConfig Config
{
Service.Config.RotationActionConfig[ID] = value
= Setting.CreateConfig?.Invoke() ?? new();
if (Setting.TargetStatusProvide != null)
{
value.TimeToKill = 10;
}
}
return value;
}
Expand Down Expand Up @@ -100,7 +104,7 @@ public bool CanUse(out IAction act, bool skipStatusProvideCheck = false, bool sk


if (Setting.IsMeleeRange && IActionHelper.IsLastAction(IActionHelper.MovingActions)) return false; //No range actions after moving.
if (Setting.IsFriendly && DataCenter.AverageTimeToKill < Config.TimeToKill) return false;
if (DataCenter.AverageTimeToKill < Config.TimeToKill) return false;

PreviewTarget = TargetInfo.FindTarget(skipAoeCheck, skipStatusProvideCheck);
if (PreviewTarget == null) return false;
Expand Down

0 comments on commit 6a5998c

Please sign in to comment.