Skip to content

Commit 60d04d7

Browse files
authored
Merge pull request #958 from FFXIV-CombatReborn/DTRACM
Added additonal DTR config option, ironed out a bug with player action intercept system
2 parents aa3bcf2 + f35f4dd commit 60d04d7

File tree

5 files changed

+29
-4
lines changed

5 files changed

+29
-4
lines changed

RotationSolver.Basic/Configuration/Configs.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -861,6 +861,10 @@ public const string
861861
Filter = TargetConfig)]
862862
private static readonly bool _bigHP = false;
863863

864+
[ConditionBool, UI("Change clicking the DTR bar behaviour to cycle between Off and Manual (Overrides below option).",
865+
Filter = TargetConfig)]
866+
private static readonly bool _dtrManual = false;
867+
864868
[ConditionBool, UI("Change clicking the DTR bar behaviour to cycle through each Target Type selected.",
865869
Filter = TargetConfig)]
866870
private static readonly bool _dtrCycle = false;

RotationSolver.Basic/DataCenter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ public static IAction? CommandNextAction
135135
}
136136

137137
while (next != null && NextActs.Count > 0 &&
138-
(next.DeadTime < DateTime.Now || IActionHelper.IsLastAction(true, next.Act)))
138+
(next.DeadTime < DateTime.Now || IActionHelper.IsLastAction(false, next.Act)))
139139
{
140140
NextActs.RemoveAt(0);
141141
next = NextActs.Count > 0 ? NextActs[0] : null;

RotationSolver/Updaters/ActionQueueManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ private static unsafe bool UseActionDetour(ActionManager* actionManager, uint ac
109109
{
110110
if (matchingAction.IsIntercepted)
111111
{
112-
if (matchingAction.EnoughLevel && (!matchingAction.Cooldown.IsCoolingDown || Service.Config.InterceptCooldown))
112+
if (matchingAction.EnoughLevel && (matchingAction.Cooldown.CurrentCharges > 0 || Service.Config.InterceptCooldown))
113113
{
114114
HandleInterceptedAction(matchingAction, actionID);
115115
return false; // Block the original action

RotationSolver/Updaters/MajorUpdater.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@ private static void RSRUpdate(IFramework framework)
149149
MacroUpdater.UpdateMacro();
150150
TargetUpdater.UpdateTargets();
151151
StateUpdater.UpdateState();
152-
ActionSequencerUpdater.UpdateActionSequencerAction();
153152
ActionUpdater.UpdateNextAction();
153+
ActionSequencerUpdater.UpdateActionSequencerAction();
154154
}
155155
catch (Exception ex)
156156
{

RotationSolver/Updaters/MiscUpdater.cs

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ internal static void UpdateEntry()
5353
new IconPayload(icon),
5454
new TextPayload(showStr)
5555
);
56-
if (Service.Config.DtrCycle)
56+
if (Service.Config.DtrManual)
57+
{
58+
_dtrEntry.OnClick = _ => CycleStateWithAllTargetTypes();
59+
}
60+
else if (Service.Config.DtrCycle)
5761
{
5862
_dtrEntry.OnClick = _ => CycleStateWithAllTargetTypes();
5963
}
@@ -69,6 +73,23 @@ internal static void UpdateEntry()
6973
}
7074
}
7175

76+
private static void CycleStateManual()
77+
{
78+
// If currently in off mode and not manual, go to Manual
79+
if (DataCenter.State && !DataCenter.IsManual)
80+
{
81+
RSCommands.DoStateCommandType(StateCommandType.Manual);
82+
return;
83+
}
84+
85+
// If currently in Manual mode, turn off
86+
if (DataCenter.State && DataCenter.IsManual)
87+
{
88+
RSCommands.DoStateCommandType(StateCommandType.Off);
89+
return;
90+
}
91+
}
92+
7293
private static void CycleStateWithAllTargetTypes()
7394
{
7495
// If currently Off, start with the first TargetType

0 commit comments

Comments
 (0)