Skip to content

Commit

Permalink
Merge pull request #127 from FFXIV-CombatReborn/action-ahead-adjustments
Browse files Browse the repository at this point in the history
Corrected slidecast calculation on next action window
  • Loading branch information
NostraThomas99 authored Apr 25, 2024
2 parents e0d5a86 + 0138b41 commit cc17cac
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions RotationSolver/UI/NextActionWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,9 @@ public override unsafe void Draw()

public static unsafe void DrawGcdCooldown(float width, bool drawTittle)
{
var group = ActionManager.Instance()->GetRecastGroupDetail(ActionHelper.GCDCooldownGroup - 1);

var remain = group->Total - group->Elapsed;
var remain = DataCenter.DefaultGCDRemain;
var total = DataCenter.DefaultGCDTotal;
var elapsed = DataCenter.DefaultGCDElapsed;

if (drawTittle)
{
Expand All @@ -84,12 +83,12 @@ public static unsafe void DrawGcdCooldown(float width, bool drawTittle)
var cursor = ImGui.GetCursorPos() + ImGui.GetWindowPos();
var height = Service.Config.ControlProgressHeight ;

ImGui.ProgressBar(group->Elapsed / group->Total, new Vector2(width, height), string.Empty);
ImGui.ProgressBar(elapsed / total, new Vector2(width, height), string.Empty);

var actionRemain = DataCenter.DefaultGCDElapsed;
var actionRemain = DataCenter.DefaultGCDRemain;
if (actionRemain > 0)
{
var value = total - remain + actionRemain;
var value = total - DataCenter.ActionAhead;

if (value > Player.Object.TotalCastTime)
{
Expand Down

0 comments on commit cc17cac

Please sign in to comment.