From 5f660a0cd1aa6c8615adb5e23f8efd68269045a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=8B=E6=B0=B4?= <1123993881@qq.com> Date: Thu, 20 Apr 2023 22:19:56 +0800 Subject: [PATCH] fix: fixed cd on NextWindow. --- Resources/AnimationLockTime.json | 19 +++++++++++++++++++ .../Rotations/Basic/PLD_Base.cs | 1 + RotationSolver/UI/CooldownWindow.cs | 1 + RotationSolver/UI/NextActionWindow.cs | 4 ++-- 4 files changed, 23 insertions(+), 2 deletions(-) diff --git a/Resources/AnimationLockTime.json b/Resources/AnimationLockTime.json index 39fb71669..e8a168a89 100644 --- a/Resources/AnimationLockTime.json +++ b/Resources/AnimationLockTime.json @@ -1,5 +1,12 @@ { + "3": 0.6, "5": 2.1, + "9": 0.6, + "15": 0.6, + "16": 0.6, + "20": 0.6, + "23": 0.6, + "28": 0.6, "31": 0.6, "37": 0.6, "42": 0.6, @@ -23,6 +30,8 @@ "2876": 0.6, "2878": 0.6, "2890": 0.6, + "3538": 0.6, + "3539": 0.6, "3546": 0.6, "3547": 0.6, "3549": 0.6, @@ -41,6 +50,8 @@ "3640": 0.6, "3643": 0.6, "4262": 0.6, + "7383": 0.6, + "7384": 0.6, "7386": 0.6, "7387": 0.6, "7389": 0.6, @@ -59,6 +70,9 @@ "7546": 0.6, "7548": 0.6, "9826": 0.1, + "16459": 0.6, + "16460": 0.6, + "16461": 0.6, "16465": 0.6, "16469": 0.6, "16470": 0.6, @@ -70,6 +84,11 @@ "16500": 0.6, "16501": 0.6, "17209": 0.6, + "25746": 0.6, + "25747": 0.6, + "25748": 0.6, + "25749": 0.6, + "25750": 0.6, "25753": 1.15, "25755": 0.6, "25756": 0.6, diff --git a/RotationSolver.Basic/Rotations/Basic/PLD_Base.cs b/RotationSolver.Basic/Rotations/Basic/PLD_Base.cs index 19fbb86be..9db93606f 100644 --- a/RotationSolver.Basic/Rotations/Basic/PLD_Base.cs +++ b/RotationSolver.Basic/Rotations/Basic/PLD_Base.cs @@ -38,6 +38,7 @@ public abstract class PLD_Base : CustomRotation { FilterForHostiles = LowBlow.FilterForHostiles, ActionCheck = b => LowBlow.IsCoolingDown, + StatusProvide = new StatusID[] { StatusID.Stun }, }; public static IBaseAction FightOrFlight { get; } = new BaseAction(ActionID.FightOrFlight, ActionOption.Buff); diff --git a/RotationSolver/UI/CooldownWindow.cs b/RotationSolver/UI/CooldownWindow.cs index 9b6b491c2..9752998cc 100644 --- a/RotationSolver/UI/CooldownWindow.cs +++ b/RotationSolver/UI/CooldownWindow.cs @@ -40,6 +40,7 @@ public override void Draw() } static readonly uint progressCol = ImGui.ColorConvertFloat4ToU32(new Vector4(0.6f, 0.6f, 0.6f, 0.7f)); + private static void DrawActionCooldown(IAction act) { var width = Service.Config.CooldownWindowIconSize; diff --git a/RotationSolver/UI/NextActionWindow.cs b/RotationSolver/UI/NextActionWindow.cs index fd453b957..82cf94dbf 100644 --- a/RotationSolver/UI/NextActionWindow.cs +++ b/RotationSolver/UI/NextActionWindow.cs @@ -39,14 +39,14 @@ public static unsafe void DrawGcdCooldown(float width, bool drawTittle) var actionRemain = DataCenter.ActionRemain; if(remain > actionRemain + 0.6f + DataCenter.Ping) { - var value = (total - remain + actionRemain) / total; + var value = total - remain + actionRemain; if (value > DataCenter.CastingTotal) { var pt = cursor + new Vector2(width, 0) * value / total; ImGui.GetWindowDrawList().AddLine(pt, pt + new Vector2(0, height), - ImGui.ColorConvertFloat4ToU32(ImGuiColors.DalamudRed)); + ImGui.ColorConvertFloat4ToU32(ImGuiColors.DalamudRed), 2); } } }