Skip to content

Commit

Permalink
Merge pull request #19 from FFXIV-CombatReborn/ogcd-fix
Browse files Browse the repository at this point in the history
Corrected animation lock code to fix oGCDs
  • Loading branch information
NostraThomas99 authored Mar 29, 2024
2 parents b667743 + 179dc0a commit dff1315
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
10 changes: 1 addition & 9 deletions RotationSolver.Basic/Actions/ActionCooldownInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,16 +166,8 @@ internal bool CooldownCheck(bool isEmpty, bool onLastAbility, bool ignoreClippin

if (!_action.Info.IsRealGCD)
{
if (onLastAbility)
{
if (DataCenter.NextAbilityToNextGCD > ActionManagerHelper.GetCurrentAnimationLock() + DataCenter.Ping + DataCenter.MinAnimationLock) return false;
}
else if (!ignoreClippingCheck)
{
if (DataCenter.NextAbilityToNextGCD < ActionManagerHelper.GetCurrentAnimationLock()) return false;
}
if (ActionManagerHelper.GetCurrentAnimationLock() > 0) return false;
}

return true;
}
}
2 changes: 1 addition & 1 deletion RotationSolver.Basic/DataCenter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public static IAction? CommandNextAction
return next?.Act ?? ActionSequencerAction;
}
}
public static Job Job { get; set; }
public static Job Job => Player.Job;

public static JobRole Role => Service.GetSheet<ClassJob>().GetRow((uint)Job)?.GetJobRole() ?? JobRole.None;

Expand Down
2 changes: 0 additions & 2 deletions RotationSolver/Updaters/RotationUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -509,14 +509,12 @@ private static void UpdateCustomRotation()
DataCenter.RightNowRotation = instance;
}
RightRotationActions = DataCenter.RightNowRotation?.AllActions ?? [];
DataCenter.Job = DataCenter.RightNowRotation?.Job ?? Job.ADV;
return;
}

CustomRotation.MoveTarget = null;
DataCenter.RightNowRotation = null;
RightRotationActions = [];
DataCenter.Job = DataCenter.RightNowRotation?.Job ?? Job.ADV;

static ICustomRotation? GetRotation(Type? t)
{
Expand Down

0 comments on commit dff1315

Please sign in to comment.