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

Commit

Permalink
fix: ActionAhead can't be greater than 0.4s.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Apr 25, 2023
1 parent e859822 commit e05b6d2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
11 changes: 6 additions & 5 deletions RotationSolver/UI/RotationConfigWindow_List.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,11 @@ private void DrawDangerousStatus()
Service.Config.DangerousStatus.Add(0);
}

for (int i = 0; i < Service.Config.DangerousStatus.Count; i++)
{
//ImGuiHelper.SearchCombo()
}
//for (int i = 0; i < Service.Config.DangerousStatus.Count; i++)
//{
// ImGuiHelper.SearchCombo($"DangerousStatus{Service.Config.DangerousStatus[i]}",
// )
//}
}

private void DrawInvinsibility()
Expand All @@ -119,6 +120,6 @@ private void DrawInvinsibility()
Service.Config.InvincibleStatus.Add(0);
}

TargetCondition.AllStatus;
//TargetCondition.AllStatus;
}
}
2 changes: 1 addition & 1 deletion RotationSolver/UI/RotationConfigWindow_Param.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ private void DrawParamTab()
private void DrawParamBasic()
{
DrawFloatNumber(LocalizationManager.RightLang.ConfigWindow_Param_ActionAhead,
ref Service.Config.ActionAhead, Service.Default.ActionAhead, max: 0.5f);
ref Service.Config.ActionAhead, Service.Default.ActionAhead, max: 0.4f);

DrawFloatNumber(LocalizationManager.RightLang.ConfigWindow_Param_CountDownAhead,
ref Service.Config.CountDownAhead, Service.Default.CountDownAhead, min: 0.5f, max: 0.7f);
Expand Down
8 changes: 5 additions & 3 deletions RotationSolver/Updaters/ActionUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,10 @@ internal unsafe static void DoAction()
&& ActionManager.Instance()->QueuedActionId != NextAction.AdjustedID
|| Service.Player.CurrentHp == 0) return;

var ahead = Math.Max(0.4f, Service.Config.ActionAhead);

//GCD
var canUseGCD = DataCenter.WeaponRemain <= Service.Config.ActionAhead;
var canUseGCD = DataCenter.WeaponRemain <= ahead;
if (_GCDDelay.Delay(canUseGCD)) RSCommands.DoAnAction(true);
if (canUseGCD) return;

Expand All @@ -195,10 +197,10 @@ internal unsafe static void DoAction()
//The last one.
if (timeToNext + nextAction.AnimationLockTime + DataCenter.Ping + DataCenter.MinAnimationLock > DataCenter.WeaponRemain)
{
if (DataCenter.WeaponRemain > nextAction.AnimationLockTime + DataCenter.Ping + Service.Config.ActionAhead) return;
if (DataCenter.WeaponRemain > nextAction.AnimationLockTime + DataCenter.Ping + ahead) return;
RSCommands.DoAnAction(false);
}
else if (timeToNext < Service.Config.ActionAhead)
else if (timeToNext < ahead)
{
RSCommands.DoAnAction(false);
}
Expand Down

0 comments on commit e05b6d2

Please sign in to comment.