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

Commit

Permalink
fix: fixed action sequencer delay.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Aug 29, 2023
1 parent 5b16e58 commit 44fc4f9
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Resources/RotationSolverRecord.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"ClickingCount": 10923
"ClickingCount": 10946
}
10 changes: 9 additions & 1 deletion RotationSolver.Basic/Data/RandomDelay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/// <summary>
/// Random delay the bool.
/// </summary>
public struct RandomDelay
public class RandomDelay
{
DateTime _startDelayTime = DateTime.Now;
float _delayTime = -1;
Expand All @@ -25,6 +25,14 @@ public RandomDelay(Func<(float min, float max)> getRange)
GetRange = getRange;
}

/// <summary>
///
/// </summary>
public RandomDelay()
{

}

/// <summary>
/// Delay the bool.
/// </summary>
Expand Down
7 changes: 5 additions & 2 deletions RotationSolver/ActionSequencer/BaseCondition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,17 @@ internal abstract class BaseCondition : ICondition
public float DelayMin = 0;
public float DelayMax = 0;

private RandomDelay _delay = new RandomDelay();
RandomDelay _delay = new RandomDelay();

[JsonIgnore]
private const float MIN = 0, MAX = 60;

public bool IsTrue(ICustomRotation rotation)
{
_delay.GetRange = () => (DelayMin, DelayMax);
if(_delay.GetRange == null)
{
_delay.GetRange = () => (DelayMin, DelayMax);
}
return _delay.Delay(IsTrueInside(rotation));
}

Expand Down
1 change: 0 additions & 1 deletion RotationSolver/ActionSequencer/ConditionSet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ public override void BeforeDraw()

public override void DrawInside(ICustomRotation rotation)
{

AddButton();

ImGui.SameLine();
Expand Down
4 changes: 3 additions & 1 deletion RotationSolver/Localization/Localization.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,9 @@
"ConfigWindow_Param_HealthHealerRatio": "Heal healer first if its HP%% is lower than this.",
"ConfigWindow_Param_HealthTankRatio": "Heal tank first if its HP%% is lower than this.",
"ConfigWindow_Param_DistanceForMoving": "Use gapcloser as a damage ability if the distance to your target is less then this.",
"ConfigWindow_Param_HealWhenNothingTodoBelow": "Healing the members with GCD if there is nothing to do in combat and their min HP%% is lower than this.",
"ConfigWindow_Param_HealWhenNothingTodo": "Healing the members with GCD if there is nothing to do in combat.",
"ConfigWindow_Param_HealWhenNothingTodoBelow": "When their min HP%% is lower than this.",
"ConfigWindow_Param_HealWhenNothingTodoDelay": "The delay of this type of healing.",
"ConfigWindow_Param_HealthForDyingTank": "Set the HP%% for tank to use invulnerability",
"ConfigWindow_Param_MeleeRangeOffset": "Melee Range action using offset",
"ConfigWindow_Param_RightNowTargetToHostileType": "Engage settings",
Expand Down
1 change: 0 additions & 1 deletion RotationSolver/Updaters/TargetUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
using FFXIVClientStructs.FFXIV.Client.UI;
using Lumina.Excel.GeneratedSheets;
using RotationSolver.Basic.Configuration;
using System.Configuration;
using System.Text.RegularExpressions;
using Action = Lumina.Excel.GeneratedSheets.Action;

Expand Down

0 comments on commit 44fc4f9

Please sign in to comment.