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

Commit

Permalink
fix: changed the Move method signature.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Apr 22, 2023
1 parent a7ac0d1 commit 6625e29
Show file tree
Hide file tree
Showing 13 changed files with 33 additions and 30 deletions.
4 changes: 2 additions & 2 deletions RotationSolver.Basic/Rotations/Basic/DNC_Base.cs
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,9 @@ protected static bool ExecuteStepGCD(out IAction act)
#endregion

[RotationDesc(ActionID.EnAvant)]
protected sealed override bool MoveForwardAbility(out IAction act, CanUseOption option = CanUseOption.None)
protected sealed override bool MoveForwardAbility(out IAction act)
{
if (EnAvant.CanUse(out act, CanUseOption.EmptyOrSkipCombo | option | CanUseOption.IgnoreClippingCheck)) return true;
if (EnAvant.CanUse(out act)) return true;
return false;
}

Expand Down
5 changes: 2 additions & 3 deletions RotationSolver.Basic/Rotations/Basic/DRK_Base.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,9 @@ protected override bool EmergencyAbility(IAction nextGCD, out IAction act)
}

[RotationDesc(ActionID.Plunge)]
protected sealed override bool MoveForwardAbility(out IAction act, CanUseOption option = CanUseOption.None)
protected sealed override bool MoveForwardAbility(out IAction act)
{
if (Plunge.CanUse(out act, CanUseOption.EmptyOrSkipCombo | option | CanUseOption.IgnoreClippingCheck)) return true;

if (Plunge.CanUse(out act)) return true;
return false;
}
}
4 changes: 2 additions & 2 deletions RotationSolver.Basic/Rotations/Basic/GNB_Base.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ protected override bool EmergencyAbility(IAction nextGCD, out IAction act)
}

[RotationDesc(ActionID.RoughDivide)]
protected sealed override bool MoveForwardAbility(out IAction act, CanUseOption option = CanUseOption.None)
protected sealed override bool MoveForwardAbility(out IAction act)
{
if (RoughDivide.CanUse(out act, CanUseOption.EmptyOrSkipCombo | option | CanUseOption.IgnoreClippingCheck)) return true;
if (RoughDivide.CanUse(out act)) return true;
return false;
}
}
Expand Down
6 changes: 3 additions & 3 deletions RotationSolver.Basic/Rotations/Basic/MNK_Base.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ public abstract class MNK_Base : CustomRotation
};

[RotationDesc(ActionID.Thunderclap)]
protected sealed override bool MoveForwardAbility(out IAction act, CanUseOption option = CanUseOption.None)
protected sealed override bool MoveForwardAbility(out IAction act)
{
if (Thunderclap.CanUse(out act, CanUseOption.EmptyOrSkipCombo | option | CanUseOption.IgnoreClippingCheck)) return true;
return base.MoveForwardAbility(out act, option);
if (Thunderclap.CanUse(out act)) return true;
return base.MoveForwardAbility(out act);
}

[RotationDesc(ActionID.Feint)]
Expand Down
6 changes: 3 additions & 3 deletions RotationSolver.Basic/Rotations/Basic/NIN_Base.cs
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,10 @@ internal NinAction(ActionID actionID, params IBaseAction[] ninjutsu)


[RotationDesc(ActionID.Shukuchi)]
protected sealed override bool MoveForwardAbility(out IAction act, CanUseOption option = CanUseOption.None)
protected sealed override bool MoveForwardAbility(out IAction act)
{
if (Shukuchi.CanUse(out act, CanUseOption.EmptyOrSkipCombo | option | CanUseOption.IgnoreClippingCheck)) return true;
return base.MoveForwardAbility(out act, option);
if (Shukuchi.CanUse(out act)) return true;
return base.MoveForwardAbility(out act);
}

[RotationDesc(ActionID.Feint)]
Expand Down
6 changes: 3 additions & 3 deletions RotationSolver.Basic/Rotations/Basic/PLD_Base.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,10 @@ protected override bool EmergencyAbility(IAction nextGCD, out IAction act)
}

[RotationDesc(ActionID.Intervene)]
protected sealed override bool MoveForwardAbility(out IAction act, CanUseOption option = CanUseOption.None)
protected sealed override bool MoveForwardAbility(out IAction act)
{
if (Intervene.CanUse(out act, CanUseOption.EmptyOrSkipCombo | option | CanUseOption.IgnoreClippingCheck)) return true;
return base.MoveForwardAbility(out act, option);
if (Intervene.CanUse(out act)) return true;
return base.MoveForwardAbility(out act);
}

[RotationDesc(ActionID.Clemency)]
Expand Down
6 changes: 3 additions & 3 deletions RotationSolver.Basic/Rotations/Basic/RDM_Base.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,10 @@ protected sealed override bool HealSingleGCD(out IAction act)
}

[RotationDesc(ActionID.CorpsACorps)]
protected sealed override bool MoveForwardAbility(out IAction act, CanUseOption option = CanUseOption.None)
protected sealed override bool MoveForwardAbility(out IAction act)
{
if (CorpsACorps.CanUse(out act, CanUseOption.EmptyOrSkipCombo | option | CanUseOption.IgnoreClippingCheck)) return true;
return base.MoveForwardAbility(out act, option);
if (CorpsACorps.CanUse(out act)) return true;
return base.MoveForwardAbility(out act);
}

[RotationDesc(ActionID.Addle, ActionID.MagickBarrier)]
Expand Down
4 changes: 2 additions & 2 deletions RotationSolver.Basic/Rotations/Basic/RPR_Base.cs
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,9 @@ public abstract class RPR_Base : CustomRotation
#endregion

[RotationDesc(ActionID.HellsIngress)]
protected sealed override bool MoveForwardAbility(out IAction act, CanUseOption option = CanUseOption.None)
protected sealed override bool MoveForwardAbility(out IAction act)
{
if (HellsIngress.CanUse(out act, CanUseOption.EmptyOrSkipCombo | option | CanUseOption.IgnoreClippingCheck)) return true;
if (HellsIngress.CanUse(out act)) return true;
return false;
}

Expand Down
4 changes: 2 additions & 2 deletions RotationSolver.Basic/Rotations/Basic/SAM_Base.cs
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@ public abstract class SAM_Base : CustomRotation
#endregion

[RotationDesc(ActionID.HissatsuGyoten)]
protected sealed override bool MoveForwardAbility(out IAction act, CanUseOption option = CanUseOption.None)
protected sealed override bool MoveForwardAbility(out IAction act)
{
if (HissatsuGyoten.CanUse(out act, CanUseOption.EmptyOrSkipCombo | option | CanUseOption.IgnoreClippingCheck)) return true;
if (HissatsuGyoten.CanUse(out act)) return true;
return false;
}

Expand Down
5 changes: 2 additions & 3 deletions RotationSolver.Basic/Rotations/Basic/SGE_Base.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,9 @@ protected static bool AddersgallEndAfterGCD(uint gctCount = 0, int abilityCount
};

[RotationDesc(ActionID.Icarus)]
protected sealed override bool MoveForwardAbility(out IAction act, CanUseOption option = CanUseOption.None)
protected sealed override bool MoveForwardAbility(out IAction act)
{
//ÉñÒí
if (Icarus.CanUse(out act, CanUseOption.EmptyOrSkipCombo | option | CanUseOption.IgnoreClippingCheck)) return true;
if (Icarus.CanUse(out act)) return true;
return false;
}
}
4 changes: 2 additions & 2 deletions RotationSolver.Basic/Rotations/Basic/WAR_Base.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ protected override bool EmergencyAbility(IAction nextGCD, out IAction act)
}

[RotationDesc(ActionID.Onslaught)]
protected sealed override bool MoveForwardAbility(out IAction act, CanUseOption option = CanUseOption.None)
protected sealed override bool MoveForwardAbility(out IAction act)
{
if (Onslaught.CanUse(out act, CanUseOption.EmptyOrSkipCombo | option | CanUseOption.IgnoreClippingCheck)) return true;
if (Onslaught.CanUse(out act)) return true;
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion RotationSolver.Basic/Rotations/CustomRotation_Ability.cs
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ protected virtual bool EmergencyAbility(IAction nextGCD, out IAction act)
}

[RotationDesc(DescType.MoveForwardAbility)]
protected virtual bool MoveForwardAbility(out IAction act, CanUseOption option = CanUseOption.None)
protected virtual bool MoveForwardAbility(out IAction act)
{
act = null; return false;
}
Expand Down
7 changes: 6 additions & 1 deletion RotationSolver.Basic/Rotations/CustomRotation_Invoke.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Dalamud.Logging;
using static FFXIVClientStructs.FFXIV.Client.UI.Misc.ConfigModule;

namespace RotationSolver.Basic.Rotations;

Expand All @@ -15,7 +16,11 @@ public bool TryInvoke(out IAction newAction, out IAction gcdAction)
var role = Job.GetJobRole();

ActionMoveForwardGCD = MoveForwardGCD(out var act) ? act : null;
var movingTarget = MoveForwardAbility(out act, CanUseOption.IgnoreTarget);

BaseAction.OtherOption = CanUseOption.IgnoreTarget | CanUseOption.EmptyOrSkipCombo | CanUseOption.IgnoreClippingCheck;
var movingTarget = MoveForwardAbility(out act);
BaseAction.OtherOption = CanUseOption.None;

ActionMoveForwardAbility = movingTarget ? act : null;
MoveTarget = (movingTarget && act is IBaseAction a) ? a.Target : null;

Expand Down

0 comments on commit 6625e29

Please sign in to comment.