Skip to content

Commit

Permalink
bypass ttk check
Browse files Browse the repository at this point in the history
A lot of GCDs couldn't be used at the end of the fights due to TTK check. This is a bypass, so no need to change every job's rotation file in RSR. Turn on true when used in RR if desired, otherwise it doesn't affect existing code because it's false by default.
  • Loading branch information
MillerTheBest committed Oct 29, 2024
1 parent 7e0ffab commit 57df7db
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 5 additions & 2 deletions RotationSolver.Basic/Actions/BaseAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public BaseAction(ActionID actionID, bool isDutyAction = false)

/// <inheritdoc/>
public bool CanUse(out IAction act, bool isLastAbility = false, bool isFirstAbility = false, bool skipStatusProvideCheck = false, bool skipComboCheck = false, bool skipCastingCheck = false,
bool usedUp = false, bool skipAoeCheck = false, byte gcdCountForAbility = 0)
bool usedUp = false, bool skipAoeCheck = false, bool skipTTKCheck = false, byte gcdCountForAbility = 0)
{
act = this;

Expand All @@ -149,7 +149,10 @@ public bool CanUse(out IAction act, bool isLastAbility = false, bool isFirstAbil

if (Setting.SpecialType == SpecialActionType.MeleeRange && IActionHelper.IsLastAction(IActionHelper.MovingActions)) return false; // No range actions after moving.

if (!IsTimeToKillValid()) return false;
if (!skipTTKCheck)
{
if (!IsTimeToKillValid()) return false;
}

PreviewTarget = TargetInfo.FindTarget(skipAoeCheck, skipStatusProvideCheck);
if (PreviewTarget == null) return false;
Expand Down
3 changes: 2 additions & 1 deletion RotationSolver.Basic/Actions/IBaseAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@ public interface IBaseAction : IAction
/// <param name="skipCastingCheck">Skip Casting and Moving Check</param>
/// <param name="usedUp">Is it used up all stacks</param>
/// <param name="skipAoeCheck">Skip aoe Check</param>
/// <param name="skipTTKCheck">skip IsTimeToKillValid check in BaseAction</param>
/// <param name="gcdCountForAbility">the gcd count for the ability.</param>
/// <returns>can I use it</returns>
bool CanUse(out IAction act, bool isLastAbility = false, bool isFirstAbility = false, bool skipStatusProvideCheck = false, bool skipComboCheck = false, bool skipCastingCheck = false,
bool usedUp = false, bool skipAoeCheck = false, byte gcdCountForAbility = 0);
bool usedUp = false, bool skipAoeCheck = false, bool skipTTKCheck = false, byte gcdCountForAbility = 0);
}

0 comments on commit 57df7db

Please sign in to comment.