From 872997c2bb76e07a48a9b82339a02ed496d34011 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=8B=E6=B0=B4?= <1123993881@qq.com> Date: Sun, 20 Aug 2023 16:02:43 +0800 Subject: [PATCH] fix: add an image to illustrate the timer. --- Images/HowAndWhenToClick.svg | 439 ------------------ Resources/HostileCastingArea.json | 3 +- RotationSolver.Basic/Configuration/Configs.cs | 2 +- RotationSolver.sln | 1 - RotationSolver/Localization/Localization.json | 8 +- RotationSolver/Localization/Strings.cs | 7 +- RotationSolver/UI/ImGuiHelper.cs | 16 +- RotationSolver/UI/RotationConfigWindow.cs | 3 +- .../UI/RotationConfigWindow_Config.cs | 163 ++++++- .../SearchableConfigs/DragFloatRangeSearch.cs | 5 +- .../UI/SearchableConfigs/DragFloatSearch.cs | 7 +- .../UI/SearchableConfigs/Searchable.cs | 7 +- RotationSolver/Updaters/ActionUpdater.cs | 4 +- 13 files changed, 200 insertions(+), 465 deletions(-) delete mode 100644 Images/HowAndWhenToClick.svg diff --git a/Images/HowAndWhenToClick.svg b/Images/HowAndWhenToClick.svg deleted file mode 100644 index 3c17a439c..000000000 --- a/Images/HowAndWhenToClick.svg +++ /dev/null @@ -1,439 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GCD - - - - GCD - - ADV - ADV : Time advance of using actions - ADV - ADV - ADV - Animation Lock Time - Ping - Clicking Duration - Click Start Time - Time - - - - - - - - - - - 0GCD - - - - 0GCD - - - - - - - diff --git a/Resources/HostileCastingArea.json b/Resources/HostileCastingArea.json index 22b6428df..60046b5d7 100644 --- a/Resources/HostileCastingArea.json +++ b/Resources/HostileCastingArea.json @@ -374,5 +374,6 @@ 32112, 32114, 31727, - 33018 + 33018, + 7946 ] \ No newline at end of file diff --git a/RotationSolver.Basic/Configuration/Configs.cs b/RotationSolver.Basic/Configuration/Configs.cs index a14f1ff17..5c77197ed 100644 --- a/RotationSolver.Basic/Configuration/Configs.cs +++ b/RotationSolver.Basic/Configuration/Configs.cs @@ -187,7 +187,7 @@ [Serializable] public class GlobalConfig { PluginConfigVector4.TargetColor, new (1f, 0.2f, 0f, 0.8f)}, { PluginConfigVector4.SubTargetColor, new (1f, 0.9f, 0f, 0.8f)}, - { PluginConfigVector4.ControlWindowLockBg, new (0, 0, 0, 0.5f)}, + { PluginConfigVector4.ControlWindowLockBg, new (0, 0, 0, 0.55f)}, { PluginConfigVector4.ControlWindowUnlockBg, new (0, 0, 0, 0.75f)}, { PluginConfigVector4.InfoWindowBg, new (0, 0, 0, 0.4f)}, }); diff --git a/RotationSolver.sln b/RotationSolver.sln index 3393ecbed..d0b703342 100644 --- a/RotationSolver.sln +++ b/RotationSolver.sln @@ -10,7 +10,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Resources\downloadList.json = Resources\downloadList.json manifest.json = manifest.json UpdateDownloads.ts = UpdateDownloads.ts - Resources\whiteList.json = Resources\whiteList.json EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RotationSolver.Basic", "RotationSolver.Basic\RotationSolver.Basic.csproj", "{140CC27C-0923-4183-9C30-26A7BDEBE606}" diff --git a/RotationSolver/Localization/Localization.json b/RotationSolver/Localization/Localization.json index d2cb4984e..e452c9d17 100644 --- a/RotationSolver/Localization/Localization.json +++ b/RotationSolver/Localization/Localization.json @@ -490,5 +490,11 @@ "ConfigWindow_Searching": "Searching...", "ConfigWindow_UI_HideWarning": "Hide Warning", "ConfigWindow_Auto_BeneficialAreaStrategy": "Beneficial area strategy", - "ConfigWindow_About_OpenConfigFolder": "Open Config Folder" + "ConfigWindow_About_OpenConfigFolder": "Open Config Folder", + "ConfigWindow_Basic_AnimationLockTime": "The Animation lock time from individual actions. Here is 0.6s for example.", + "ConfigWindow_Basic_Ping": "The ping time.\nIn RS, it means the time from sending the action request to receiving the using success message from the server.", + "ConfigWindow_Basic_IdealClickingTime": "The ideal click time.", + "ConfigWindow_Basic_RealClickingTime": "The real click time.", + "ConfigWindow_Basic_ClickingDuration": "The clicking duration, RS will try to click at this duration.", + "ConfigWindow_Basic_WeaponDelay": "This is the clipping time.\nGCD is over. However, RS forgets to click the next action." } \ No newline at end of file diff --git a/RotationSolver/Localization/Strings.cs b/RotationSolver/Localization/Strings.cs index e90dfcc9b..cfb3b066e 100644 --- a/RotationSolver/Localization/Strings.cs +++ b/RotationSolver/Localization/Strings.cs @@ -709,5 +709,10 @@ internal partial class Strings public string ConfigWindow_UI_HideWarning { get; set; } = "Hide Warning"; public string ConfigWindow_Auto_BeneficialAreaStrategy { get; set; } = "Beneficial area strategy"; public string ConfigWindow_About_OpenConfigFolder { get; set; } = "Open Config Folder"; - + public string ConfigWindow_Basic_AnimationLockTime { get; set; } = "The Animation lock time from individual actions. Here is 0.6s for example."; + public string ConfigWindow_Basic_Ping { get; set; } = "The ping time.\nIn RS, it means the time from sending the action request to receiving the using success message from the server."; + public string ConfigWindow_Basic_IdealClickingTime { get; set; } = "The ideal click time."; + public string ConfigWindow_Basic_RealClickingTime { get; set; } = "The real click time."; + public string ConfigWindow_Basic_ClickingDuration { get; set; } = "The clicking duration, RS will try to click at this duration."; + public string ConfigWindow_Basic_WeaponDelay { get; set; } = "This is the clipping time.\nGCD is over. However, RS forgets to click the next action."; } \ No newline at end of file diff --git a/RotationSolver/UI/ImGuiHelper.cs b/RotationSolver/UI/ImGuiHelper.cs index 53ec023e3..6bce0c063 100644 --- a/RotationSolver/UI/ImGuiHelper.cs +++ b/RotationSolver/UI/ImGuiHelper.cs @@ -235,8 +235,8 @@ internal static void DrawActionOverlay(Vector2 cursor, float width, float percen //Out Size is 88, 96 //Inner Size is 82, 82 - ImGui.Image(cover.ImGuiHandle, new Vector2(pixPerUnit * 88, pixPerUnit * 96), - start, start + step); + ImGui.Image(cover.ImGuiHandle, new Vector2(pixPerUnit * 88, pixPerUnit * 94), + start, start + new Vector2(88f / cover.Width, 94f / cover.Height)); } } else if (percent < 1) @@ -253,8 +253,8 @@ internal static void DrawActionOverlay(Vector2 cursor, float width, float percen //Out Size is 88, 96 //Inner Size is 82, 82 - ImGui.Image(cover.ImGuiHandle, new Vector2(pixPerUnit * 88, pixPerUnit * 96), - start, start + step); + ImGui.Image(cover.ImGuiHandle, new Vector2(pixPerUnit * 88, pixPerUnit * 94), + start, start + new Vector2(88f / cover.Width, 94f / cover.Height)); } } else @@ -266,9 +266,9 @@ internal static void DrawActionOverlay(Vector2 cursor, float width, float percen //Out Size is 88, 96 //Inner Size is 82, 82 - ImGui.Image(cover.ImGuiHandle, new Vector2(pixPerUnit * 88, pixPerUnit * 96), + ImGui.Image(cover.ImGuiHandle, new Vector2(pixPerUnit * 88, pixPerUnit * 94), new Vector2(4f / cover.Width, 0f / cover.Height), - new Vector2(92f / cover.Width, 96f / cover.Height)); + new Vector2(92f / cover.Width, 94f / cover.Height)); } } @@ -285,8 +285,8 @@ internal static void DrawActionOverlay(Vector2 cursor, float width, float percen //Out Size is 88, 96 //Inner Size is 82, 82 - ImGui.Image(cover.ImGuiHandle, new Vector2(pixPerUnit * 88, pixPerUnit * 96), - start, start + step); + ImGui.Image(cover.ImGuiHandle, new Vector2(pixPerUnit * 88, pixPerUnit * 94), + start, start + new Vector2(88f / cover.Width, 94f / cover.Height)); } } } diff --git a/RotationSolver/UI/RotationConfigWindow.cs b/RotationSolver/UI/RotationConfigWindow.cs index 978cd2740..ad28e83e8 100644 --- a/RotationSolver/UI/RotationConfigWindow.cs +++ b/RotationSolver/UI/RotationConfigWindow.cs @@ -697,7 +697,7 @@ private static void DrawRotation() private static uint ChangeAlpha(uint color) { var c = ImGui.ColorConvertU32ToFloat4(color); - c.W = 0.5f; + c.W = 0.55f; return ImGui.ColorConvertFloat4ToU32(c); } @@ -1439,6 +1439,7 @@ private static void DrawRotationsGitHub() DrawGitHubBadge(userName, repository, fileName, center: true); ImGui.Spacing(); + ImGui.Separator(); } int removeIndex = -1; diff --git a/RotationSolver/UI/RotationConfigWindow_Config.cs b/RotationSolver/UI/RotationConfigWindow_Config.cs index aa44b29c2..f2eb28d6d 100644 --- a/RotationSolver/UI/RotationConfigWindow_Config.cs +++ b/RotationSolver/UI/RotationConfigWindow_Config.cs @@ -1,9 +1,12 @@ using Dalamud.Game.ClientState.Keys; +using Dalamud.Interface.Colors; using ECommons.ImGuiMethods; +using ImGuiNET; using RotationSolver.Basic.Configuration; using RotationSolver.Localization; using RotationSolver.UI.SearchableConfigs; using RotationSolver.UI.SearchableSettings; +using System.Net.NetworkInformation; namespace RotationSolver.UI; @@ -90,13 +93,163 @@ private static void DrawBasic() } }, }); + private static readonly uint PING_COLOR = ImGui.ColorConvertFloat4ToU32(ImGuiColors.ParsedGreen); + private static readonly uint LOCK_TIME_COLOR = ImGui.ColorConvertFloat4ToU32(ImGuiColors.ParsedBlue); + private static readonly uint WEAPON_DELAY_COLOR = ImGui.ColorConvertFloat4ToU32(ImGuiColors.ParsedGold); + private static readonly uint IDEAL_CLICK_TIME_COLOR = ImGui.ColorConvertFloat4ToU32(new Vector4(0.8f, 0f, 0f, 1f)); + private static readonly uint CLICK_TIME_COLOR = ImGui.ColorConvertFloat4ToU32(ImGuiColors.ParsedPink); + private static readonly uint ADVANCE_TIME_COLOR = ImGui.ColorConvertFloat4ToU32(ImGuiColors.DalamudYellow); + private static readonly uint ADVANCE_ABILITY_TIME_COLOR = ImGui.ColorConvertFloat4ToU32(ImGuiColors.ParsedOrange); + const float gcdSize = 50, ogcdSize = 40, pingHeight = 12, spacingHeight = 8; + private static void AddPingLockTime(ImDrawListPtr drawList, Vector2 lineStart, float sizePerTime, float ping, float animationLockTime, float advanceTime, uint color, float clickTime) + { + var size = new Vector2(ping * sizePerTime, pingHeight); + drawList.AddRectFilled(lineStart, lineStart + size, ChangeAlpha(PING_COLOR)); + if (ImGuiHelper.IsInRect(lineStart, size)) + { + ImguiTooltips.ShowTooltip(LocalizationManager.RightLang.ConfigWindow_Basic_Ping); + } + + var rectStart = lineStart + new Vector2(ping * sizePerTime, 0); + size = new Vector2(animationLockTime * sizePerTime, pingHeight); + drawList.AddRectFilled(rectStart, rectStart + size, ChangeAlpha(LOCK_TIME_COLOR)); + if (ImGuiHelper.IsInRect(rectStart, size)) + { + ImguiTooltips.ShowTooltip(LocalizationManager.RightLang.ConfigWindow_Basic_AnimationLockTime); + } + + drawList.AddLine(lineStart - new Vector2(0, spacingHeight), lineStart + new Vector2(0, pingHeight * 2 + spacingHeight / 2), IDEAL_CLICK_TIME_COLOR, 1.5f); + + rectStart = lineStart + new Vector2(-advanceTime * sizePerTime, pingHeight); + size = new Vector2(advanceTime * sizePerTime, pingHeight); + drawList.AddRectFilled(rectStart, rectStart + size, ChangeAlpha(color)); + if (ImGuiHelper.IsInRect(rectStart, size)) + { + ImguiTooltips.ShowTooltip(() => + { + ImGui.TextWrapped(LocalizationManager.RightLang.ConfigWindow_Basic_ClickingDuration); + + ImGui.Separator(); + + ImGui.TextColored(ImGui.ColorConvertU32ToFloat4( IDEAL_CLICK_TIME_COLOR), + LocalizationManager.RightLang.ConfigWindow_Basic_IdealClickingTime); + + ImGui.TextColored(ImGui.ColorConvertU32ToFloat4(CLICK_TIME_COLOR), + LocalizationManager.RightLang.ConfigWindow_Basic_RealClickingTime); + }); + } + + float time = 0; + while (time < advanceTime) + { + var start = lineStart + new Vector2((time - advanceTime) * sizePerTime, 0); + drawList.AddLine(start + new Vector2(0, pingHeight), start + new Vector2(0, pingHeight * 2 + spacingHeight), CLICK_TIME_COLOR, 2.5f); + + time += clickTime; + } + } private static void DrawBasicTimer() { + var gcdTime = DataCenter.WeaponTotal; + if (gcdTime == 0) gcdTime = 2.5f; + var wholeWidth = ImGui.GetWindowWidth(); + var ping = DataCenter.Ping; + + ImGui.PushFont(ImGuiHelper.GetFont(14)); + ImGui.PushStyleColor(ImGuiCol.Text, ImGui.ColorConvertFloat4ToU32(ImGuiColors.DalamudYellow)); + var infoText = $"GCD: {gcdTime:F2}s Ping: {ping:F2}s"; + var infoSize = ImGui.CalcTextSize(infoText); + + ImGuiHelper.DrawItemMiddle(() => + { + ImGui.Text(infoText); + }, wholeWidth, infoSize.X); + ImGui.PopStyleColor(); + ImGui.PopFont(); + + var actionAhead = Service.Config.GetValue(PluginConfigFloat.ActionAhead); + var minAbilityAhead = Service.Config.GetValue(PluginConfigFloat.MinLastAbilityAdvanced); + var animationLockTime = DataCenter.MinAnimationLock; + var weaponDelay = (Service.Config.GetValue(PluginConfigFloat.WeaponDelayMin) + Service.Config.GetValue(PluginConfigFloat.WeaponDelayMax))/2; + var clickingDelay = (Service.Config.GetValue(PluginConfigFloat.ClickingDelayMin) + Service.Config.GetValue(PluginConfigFloat.ClickingDelayMax))/2; + + var drawList = ImGui.GetWindowDrawList(); + ImGui.Spacing(); + var startCursorPt = ImGui.GetCursorPos(); + var windowsPos = ImGui.GetWindowPos(); + + var sizePerTime = (wholeWidth - gcdSize) / (gcdTime + weaponDelay + actionAhead); + + var lineStart = windowsPos + startCursorPt + new Vector2(sizePerTime * actionAhead, gcdSize + spacingHeight); + ImGuiHelper.DrawActionOverlay(startCursorPt + new Vector2(sizePerTime * actionAhead, 0), gcdSize, 0); + ImGuiHelper.DrawActionOverlay(startCursorPt + new Vector2(wholeWidth - gcdSize, 0), gcdSize, 0); + + AddPingLockTime(drawList, lineStart, sizePerTime, ping, animationLockTime, actionAhead, ADVANCE_TIME_COLOR, clickingDelay); + var start = lineStart + new Vector2(gcdTime * sizePerTime, 0); + var rectSize = new Vector2(weaponDelay * sizePerTime, pingHeight); + drawList.AddRectFilled(start, start + rectSize, WEAPON_DELAY_COLOR); + drawList.AddRect(start, start + rectSize, uint.MaxValue, 0, ImDrawFlags.Closed, 2); + if (ImGuiHelper.IsInRect(start, rectSize)) + { + ImguiTooltips.ShowTooltip(LocalizationManager.RightLang.ConfigWindow_Basic_WeaponDelay); + } + drawList.AddLine(lineStart + new Vector2((gcdTime + weaponDelay) * sizePerTime, -spacingHeight), lineStart + new Vector2((gcdTime + weaponDelay) * sizePerTime, + pingHeight * 2 + spacingHeight), IDEAL_CLICK_TIME_COLOR, 2); + + ImGui.PushFont(ImGuiHelper.GetFont(20)); + const string gcdText = "GCD"; + var size = ImGui.CalcTextSize(gcdText); + ImGui.SetCursorPos(startCursorPt + new Vector2(sizePerTime * actionAhead + (gcdSize - size.X) / 2, (gcdSize - size.Y) / 2)); + ImGui.Text(gcdText); + ImGui.SetCursorPos(startCursorPt + new Vector2(wholeWidth - gcdSize + (gcdSize - size.X) / 2, (gcdSize - size.Y) / 2)); + ImGui.Text(gcdText); + ImGui.PopFont(); + + ImGui.PushFont(ImGuiHelper.GetFont(14)); + const string ogcdText = "Off-\nGCD"; + size = ImGui.CalcTextSize(ogcdText); + ImGui.PopFont(); + + var timeStep = ping + animationLockTime; + var time = timeStep; + while (time < gcdTime - timeStep) + { + var isLast = time + 2 * timeStep > gcdTime; + if (isLast) + { + time = gcdTime - timeStep; + } + + ImGuiHelper.DrawActionOverlay(startCursorPt + new Vector2(sizePerTime * (actionAhead + time), 0), ogcdSize, 0); + ImGui.SetCursorPos(startCursorPt + new Vector2(sizePerTime * (actionAhead + time) + (ogcdSize - size.X) / 2, (ogcdSize - size.Y) / 2)); + + ImGui.PushFont(ImGuiHelper.GetFont(14)); + ImGui.Text(ogcdText); + ImGui.PopFont(); + + var ogcdStart = lineStart + new Vector2(time * sizePerTime, 0); + AddPingLockTime(drawList, ogcdStart, sizePerTime, ping, animationLockTime, + isLast ? MathF.Max(minAbilityAhead, actionAhead) : actionAhead, isLast ? ADVANCE_ABILITY_TIME_COLOR : ADVANCE_TIME_COLOR, clickingDelay); + + time += timeStep; + } + + ImGui.SetCursorPosY(startCursorPt.Y + gcdSize + pingHeight * 2 + 2 * spacingHeight + ImGui.GetStyle().ItemSpacing.Y); + + ImGui.Spacing(); + foreach (var searchable in _basicTimer) { searchable?.Draw(Job); } + + ImGui.Separator(); + + foreach (var searchable in _basicTimerOthers) + { + searchable?.Draw(Job); + } } private static void DrawBasicAutoSwitch() @@ -118,15 +271,17 @@ private static void DrawBasicAutoSwitch() { new DragFloatSearchPlugin(PluginConfigFloat.ActionAhead, 0.002f), new DragFloatSearchPlugin(PluginConfigFloat.MinLastAbilityAdvanced, 0.002f), - new DragFloatSearchPlugin(PluginConfigFloat.SpecialDuration, 1f), - new DragFloatSearchPlugin(PluginConfigFloat.CountDownAhead, 0.002f), new DragFloatSearchPlugin(PluginConfigFloat.MaxPing, 0.002f), - new DragFloatRangeSearchPlugin(PluginConfigFloat.WeaponDelayMin, PluginConfigFloat.WeaponDelayMax, 0.002f), - new DragFloatRangeSearchPlugin(PluginConfigFloat.ClickingDelayMin, PluginConfigFloat.ClickingDelayMax, 0.002f), }; + private static readonly ISearchable[] _basicTimerOthers = new ISearchable[] + { + new DragFloatSearchPlugin(PluginConfigFloat.SpecialDuration, 1f), + new DragFloatSearchPlugin(PluginConfigFloat.CountDownAhead, 0.002f), + }; + private static readonly ISearchable[] _basicParamsSearchable = new ISearchable[] { new CheckBoxSearchPlugin(PluginConfigBool.ToggleManual), diff --git a/RotationSolver/UI/SearchableConfigs/DragFloatRangeSearch.cs b/RotationSolver/UI/SearchableConfigs/DragFloatRangeSearch.cs index ab7a6c74b..8aa126cb8 100644 --- a/RotationSolver/UI/SearchableConfigs/DragFloatRangeSearch.cs +++ b/RotationSolver/UI/SearchableConfigs/DragFloatRangeSearch.cs @@ -66,11 +66,12 @@ internal class DragFloatRangeSearchPlugin : DragFloatRangeSearch public override LinkDescription[] Tooltips => _configMin.ToAction(); - public DragFloatRangeSearchPlugin(PluginConfigFloat configMin, PluginConfigFloat configMax, float speed) + public DragFloatRangeSearchPlugin(PluginConfigFloat configMin, PluginConfigFloat configMax, float speed, uint color = 0) : base((float)(configMin.GetAttribute()?.Min ?? 0f), (float)(configMin.GetAttribute()?.Max ?? 1f), speed) { _configMin = configMin; _configMax = configMax; + Color = color; } public override void ResetToDefault(Job job) @@ -132,7 +133,9 @@ protected override void DrawMain(Job job) if (IsJob) DrawJobIcon(); ImGui.SameLine(); + if (Color != 0) ImGui.PushStyleColor(ImGuiCol.Text, Color); ImGui.TextWrapped(Name); + if (Color != 0) ImGui.PopStyleColor(); if (ImGui.IsItemHovered()) ShowTooltip(job, false); } } diff --git a/RotationSolver/UI/SearchableConfigs/DragFloatSearch.cs b/RotationSolver/UI/SearchableConfigs/DragFloatSearch.cs index ac94e7175..9e8bfcf1a 100644 --- a/RotationSolver/UI/SearchableConfigs/DragFloatSearch.cs +++ b/RotationSolver/UI/SearchableConfigs/DragFloatSearch.cs @@ -57,10 +57,11 @@ internal class DragFloatSearchPlugin : DragFloatSearch public override string Command => _config.ToCommand(); - public DragFloatSearchPlugin(PluginConfigFloat config, float speed) + public DragFloatSearchPlugin(PluginConfigFloat config, float speed, uint color = 0) :base((float)(config.GetAttribute()?.Min ?? 0f), (float)(config.GetAttribute()?.Max ?? 1f), speed) { _config = config; + Color = color; } public override void ResetToDefault(Job job) @@ -106,7 +107,11 @@ protected override void DrawMain(Job job) if (IsJob) DrawJobIcon(); ImGui.SameLine(); + + if (Color != 0) ImGui.PushStyleColor(ImGuiCol.Text, Color); ImGui.TextWrapped(Name); + if (Color != 0) ImGui.PopStyleColor(); + if (ImGui.IsItemHovered()) ShowTooltip(job, false); } } diff --git a/RotationSolver/UI/SearchableConfigs/Searchable.cs b/RotationSolver/UI/SearchableConfigs/Searchable.cs index 67bbe0416..8480b5c08 100644 --- a/RotationSolver/UI/SearchableConfigs/Searchable.cs +++ b/RotationSolver/UI/SearchableConfigs/Searchable.cs @@ -22,6 +22,8 @@ internal abstract class Searchable : ISearchable private string Popup_Key => "Rotation Solver RightClicking: " + ID; protected virtual bool IsJob => false; + public uint Color { get; set; } = 0; + /// /// Only these job roles can get this setting. /// @@ -83,7 +85,7 @@ public unsafe void Draw(Job job) protected void ShowTooltip(Job job, bool showHand = true) { var showDesc = !string.IsNullOrEmpty(Description); - if (showDesc || Tooltips != null) + if (showDesc || Tooltips != null && Tooltips.Length > 0) { ImguiTooltips.ShowTooltip(() => { @@ -107,9 +109,6 @@ protected void ShowTooltip(Job job, bool showHand = true) ImGuiHelper.ReactPopup(Popup_Key, Command, () => ResetToDefault(job), showHand); } - - - protected static void DrawJobIcon() { ImGui.SameLine(); diff --git a/RotationSolver/Updaters/ActionUpdater.cs b/RotationSolver/Updaters/ActionUpdater.cs index c94b64e99..127f5f42c 100644 --- a/RotationSolver/Updaters/ActionUpdater.cs +++ b/RotationSolver/Updaters/ActionUpdater.cs @@ -239,8 +239,8 @@ internal unsafe static bool CanDoAction() //The last one. if (timeToNext + nextAction.AnimationLockTime + DataCenter.Ping + DataCenter.MinAnimationLock > DataCenter.WeaponRemain) { - if (DataCenter.WeaponRemain > nextAction.AnimationLockTime + ahead + - Math.Max(DataCenter.Ping, Service.Config.GetValue(PluginConfigFloat.MinLastAbilityAdvanced))) return false; + if (DataCenter.WeaponRemain > nextAction.AnimationLockTime + DataCenter.Ping + + Math.Max(ahead, Service.Config.GetValue(PluginConfigFloat.MinLastAbilityAdvanced))) return false; return RSCommands.CanDoAnAction(false); }