From a063bcaa28c8d9b0cb0f375260cea735405a954c Mon Sep 17 00:00:00 2001 From: Taurenkey Date: Sun, 15 Oct 2023 16:08:27 +0100 Subject: [PATCH 01/14] Closes #1280 --- XIVSlothCombo/Combos/CustomComboPreset.cs | 5 ++++- XIVSlothCombo/Combos/PvE/AST.cs | 13 +++++++++++++ XIVSlothCombo/XIVSlothCombo.cs | 4 ++-- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index ffb9fafbe..d213f608a 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -296,9 +296,12 @@ public enum CustomComboPreset AST_Cards_DrawOnPlay = 1000, [ParentCombo(AST_Cards_DrawOnPlay)] - [CustomComboInfo("Redraw Feature", "Sets Draw to Redraw if you pull a card with a seal you already have and you can use Redraw.", AST.JobID)] + [CustomComboInfo("Redraw Feature", "Sets Play to Redraw if you pull a card with a seal you already have and you can use Redraw.", AST.JobID)] AST_Cards_Redraw = 1032, + [ReplaceSkill(AST.Draw)] + [CustomComboInfo("Redraw on Draw", "Sets Draw to Redraw if you have the Clarifying Draw buff.", AST.JobID)] + AST_Cards_RedrawStandalone = 1040, [ReplaceSkill(AST.Play)] //Works With AST_Cards_DrawOnPlay as a feature, or by itself if AST_Cards_DrawOnPlay is disabled. diff --git a/XIVSlothCombo/Combos/PvE/AST.cs b/XIVSlothCombo/Combos/PvE/AST.cs index 9b2024749..2bbb18761 100644 --- a/XIVSlothCombo/Combos/PvE/AST.cs +++ b/XIVSlothCombo/Combos/PvE/AST.cs @@ -390,6 +390,19 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim : actionID; } + internal class AST_Cards_RedrawStandalone : CustomCombo + { + protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.AST_Cards_RedrawStandalone; + + protected override uint Invoke(uint actionID, uint lastComboActionID, float comboTime, byte level) + { + if (actionID is Draw && HasEffect(Buffs.ClarifyingDraw)) + return Redraw; + + return actionID; + } + } + internal class AST_ST_SimpleHeals : CustomCombo { protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.AST_ST_SimpleHeals; diff --git a/XIVSlothCombo/XIVSlothCombo.cs b/XIVSlothCombo/XIVSlothCombo.cs index 014b862af..5f3c4d7b5 100644 --- a/XIVSlothCombo/XIVSlothCombo.cs +++ b/XIVSlothCombo/XIVSlothCombo.cs @@ -42,7 +42,7 @@ public static uint? JobID get => jobID; set { - if (jobID != value) + if (jobID != value && value != null) { Service.PluginLog.Debug($"Switched to job {value}"); PvEFeatures.HasToOpenJob = true; @@ -165,7 +165,7 @@ public void Dispose() configWindow?.Dispose(); Service.CommandManager.RemoveHandler(Command); - + Service.Framework.Update -= CheckCurrentJob; Service.Interface.UiBuilder.OpenConfigUi -= OnOpenConfigUi; Service.Interface.UiBuilder.Draw -= DrawUI; From 63e09fad23f038420b324b12e0f5921168ec6a6c Mon Sep 17 00:00:00 2001 From: Taurenkey Date: Tue, 17 Oct 2023 14:11:30 +0100 Subject: [PATCH 02/14] Fixes #1297 --- XIVSlothCombo/CustomCombo/Functions/Target.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/XIVSlothCombo/CustomCombo/Functions/Target.cs b/XIVSlothCombo/CustomCombo/Functions/Target.cs index a974baa65..a22436937 100644 --- a/XIVSlothCombo/CustomCombo/Functions/Target.cs +++ b/XIVSlothCombo/CustomCombo/Functions/Target.cs @@ -116,6 +116,8 @@ public static bool HasFriendlyTarget(GameObject? OurTarget = null) /// Grabs healable target. Checks Soft Target then Hard Target. /// If Party UI Mouseover is enabled, find the target and return that. Else return the player. + /// Checks for a mouseover target. + /// Forces only the mouseover target, may return null. /// GameObject of a player target. public static unsafe GameObject? GetHealTarget(bool checkMOPartyUI = false, bool restrictToMouseover = false) { @@ -136,6 +138,9 @@ public static bool HasFriendlyTarget(GameObject? OurTarget = null) if (restrictToMouseover) return healTarget; } + + if (restrictToMouseover) + return healTarget; } healTarget ??= LocalPlayer; return healTarget; From 151ea41eab5c9df4b8ab5aef2c97ed7ca5e36d13 Mon Sep 17 00:00:00 2001 From: Taurenkey Date: Tue, 17 Oct 2023 14:21:33 +0100 Subject: [PATCH 03/14] Fixes #1298 --- XIVSlothCombo/Combos/PvE/PLD.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/XIVSlothCombo/Combos/PvE/PLD.cs b/XIVSlothCombo/Combos/PvE/PLD.cs index 447c26eb6..626980749 100644 --- a/XIVSlothCombo/Combos/PvE/PLD.cs +++ b/XIVSlothCombo/Combos/PvE/PLD.cs @@ -1,5 +1,6 @@ using Dalamud.Game.ClientState.JobGauge.Types; using Dalamud.Game.ClientState.Statuses; +using ECommons.DalamudServices; using System.Linq; using XIVSlothCombo.Combos.PvE.Content; using XIVSlothCombo.CustomComboNS; @@ -313,7 +314,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb // (arguably better to delay by less than a whole GCD and just stop moving to cast) if (IsEnabled(CustomComboPreset.PLD_ST_AdvancedMode_ShieldLob) && ShieldLob.LevelChecked() && - ((HolySpirit.LevelChecked() && GetResourceCost(HolySpirit) > LocalPlayer.CurrentMp) || (!HolySpirit.LevelChecked())) || IsMoving) + ((HolySpirit.LevelChecked() && GetResourceCost(HolySpirit) > LocalPlayer.CurrentMp) || (!HolySpirit.LevelChecked()) || IsMoving)) return ShieldLob; } From 6274bba8bd821501ab441c9a29eebc7692aef75f Mon Sep 17 00:00:00 2001 From: Taurenkey Date: Tue, 17 Oct 2023 16:47:21 +0100 Subject: [PATCH 04/14] Closes #1295 --- XIVSlothCombo/Combos/PvE/PLD.cs | 20 ++++++++++++++++---- XIVSlothCombo/Window/Functions/UserConfig.cs | 11 +++++++++++ 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/PLD.cs b/XIVSlothCombo/Combos/PvE/PLD.cs index 626980749..753d25dbd 100644 --- a/XIVSlothCombo/Combos/PvE/PLD.cs +++ b/XIVSlothCombo/Combos/PvE/PLD.cs @@ -1,6 +1,5 @@ using Dalamud.Game.ClientState.JobGauge.Types; using Dalamud.Game.ClientState.Statuses; -using ECommons.DalamudServices; using System.Linq; using XIVSlothCombo.Combos.PvE.Content; using XIVSlothCombo.CustomComboNS; @@ -72,7 +71,9 @@ public static UserInt PLD_SpiritsWithinOption = new("PLD_SpiritsWithinOption"), PLD_SheltronOption = new("PLD_SheltronOption"), PLD_ST_RequiescatWeave = new("PLD_ST_RequiescatWeave"), - PLD_AoE_RequiescatWeave = new("PLD_AoE_RequiescatWeave"); + PLD_AoE_RequiescatWeave = new("PLD_AoE_RequiescatWeave"), + PLD_ST_AtonementTiming = new("PLD_ST_EquilibriumTiming"), + PLD_ST_DivineMightTiming = new("PLD_ST_DivineMightTiming"); public static UserBool PLD_Intervene_MeleeOnly = new("PLD_Intervene_MeleeOnly"); } @@ -463,16 +464,27 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (lastComboActionID is RiotBlade && RageOfHalone.LevelChecked()) { if (IsEnabled(CustomComboPreset.PLD_ST_AdvancedMode_Atonement) && - HasEffect(Buffs.SwordOath) && InMeleeRange()) + HasEffect(Buffs.SwordOath) && InMeleeRange() && Config.PLD_ST_AtonementTiming == 2) return Atonement; return (IsEnabled(CustomComboPreset.PLD_ST_AdvancedMode_HolySpirit) && HasEffect(Buffs.DivineMight) && - GetResourceCost(HolySpirit) <= LocalPlayer.CurrentMp) + GetResourceCost(HolySpirit) <= LocalPlayer.CurrentMp && + Config.PLD_ST_DivineMightTiming == 2) ? HolySpirit : OriginalHook(RageOfHalone); } } + + if (IsEnabled(CustomComboPreset.PLD_ST_AdvancedMode_Atonement) && + HasEffect(Buffs.SwordOath) && InMeleeRange() && Config.PLD_ST_AtonementTiming == 1) + return Atonement; + + if (IsEnabled(CustomComboPreset.PLD_ST_AdvancedMode_HolySpirit) && + HasEffect(Buffs.DivineMight) && + GetResourceCost(HolySpirit) <= LocalPlayer.CurrentMp && + Config.PLD_ST_DivineMightTiming == 1) + return HolySpirit; } } diff --git a/XIVSlothCombo/Window/Functions/UserConfig.cs b/XIVSlothCombo/Window/Functions/UserConfig.cs index d08e483cd..4b372092e 100644 --- a/XIVSlothCombo/Window/Functions/UserConfig.cs +++ b/XIVSlothCombo/Window/Functions/UserConfig.cs @@ -1641,6 +1641,17 @@ internal static void Draw(CustomComboPreset preset, bool enabled) if (preset == CustomComboPreset.PLD_Variant_Cure) UserConfig.DrawSliderInt(1, 100, PLD.Config.PLD_VariantCure, "HP% to be at or under", 200); + if (preset == CustomComboPreset.PLD_ST_AdvancedMode_Atonement) + { + UserConfig.DrawRadioButton(PLD.Config.PLD_ST_AtonementTiming, "Early Spend", "Uses Atonement before restarting the basic combo.", 1); + UserConfig.DrawRadioButton(PLD.Config.PLD_ST_AtonementTiming, "Late Spend", "Uses Atonement before the end of the basic combo.", 2); + } + + if (preset == CustomComboPreset.PLD_ST_AdvancedMode_HolySpirit) + { + UserConfig.DrawRadioButton(PLD.Config.PLD_ST_DivineMightTiming, "Early Spend", "When under the effect of Divine Might, use Holy Spirit before restarting the basic combo.", 1); + UserConfig.DrawRadioButton(PLD.Config.PLD_ST_DivineMightTiming, "Late Spend", "When under the effect of Divine Might, uses Holy Spirit before the end of the basic combo.", 2); + } #endregion // ==================================================================================== From ecaebf4328dc3ee69821bc3a7d4ad965297357f7 Mon Sep 17 00:00:00 2001 From: Taurenkey Date: Wed, 18 Oct 2023 14:02:36 +0100 Subject: [PATCH 05/14] PLD Deja Vu --- XIVSlothCombo/Combos/PvE/PLD.cs | 14 ++++++++++---- XIVSlothCombo/Window/Functions/UserConfig.cs | 2 ++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/PLD.cs b/XIVSlothCombo/Combos/PvE/PLD.cs index 753d25dbd..d631ef7e0 100644 --- a/XIVSlothCombo/Combos/PvE/PLD.cs +++ b/XIVSlothCombo/Combos/PvE/PLD.cs @@ -454,6 +454,10 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb GetResourceCost(HolySpirit) <= LocalPlayer.CurrentMp) return HolySpirit; + if (IsEnabled(CustomComboPreset.PLD_ST_AdvancedMode_Atonement) && + GetBuffStacks(Buffs.SwordOath) is < 3 and > 0 && InMeleeRange()) + return Atonement; + // Base combo if (comboTime > 0) { @@ -464,26 +468,28 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (lastComboActionID is RiotBlade && RageOfHalone.LevelChecked()) { if (IsEnabled(CustomComboPreset.PLD_ST_AdvancedMode_Atonement) && - HasEffect(Buffs.SwordOath) && InMeleeRange() && Config.PLD_ST_AtonementTiming == 2) + HasEffect(Buffs.SwordOath) && InMeleeRange() && + (Config.PLD_ST_AtonementTiming == 2 || (Config.PLD_ST_AtonementTiming == 3 && ActionWatching.CombatActions.Count(x => x == FightOrFlight) % 2 == 0))) return Atonement; return (IsEnabled(CustomComboPreset.PLD_ST_AdvancedMode_HolySpirit) && HasEffect(Buffs.DivineMight) && GetResourceCost(HolySpirit) <= LocalPlayer.CurrentMp && - Config.PLD_ST_DivineMightTiming == 2) + (Config.PLD_ST_DivineMightTiming == 2 || (Config.PLD_ST_DivineMightTiming == 3 && ActionWatching.CombatActions.Count(x => x == FightOrFlight) % 2 == 1))) ? HolySpirit : OriginalHook(RageOfHalone); } } if (IsEnabled(CustomComboPreset.PLD_ST_AdvancedMode_Atonement) && - HasEffect(Buffs.SwordOath) && InMeleeRange() && Config.PLD_ST_AtonementTiming == 1) + HasEffect(Buffs.SwordOath) && InMeleeRange() && + (Config.PLD_ST_AtonementTiming == 1 || (Config.PLD_ST_AtonementTiming == 3 && ActionWatching.CombatActions.Count(x => x == FightOrFlight) % 2 == 1))) return Atonement; if (IsEnabled(CustomComboPreset.PLD_ST_AdvancedMode_HolySpirit) && HasEffect(Buffs.DivineMight) && GetResourceCost(HolySpirit) <= LocalPlayer.CurrentMp && - Config.PLD_ST_DivineMightTiming == 1) + (Config.PLD_ST_DivineMightTiming == 1 || (Config.PLD_ST_DivineMightTiming == 3 && ActionWatching.CombatActions.Count(x => x == FightOrFlight) % 2 == 0))) return HolySpirit; } } diff --git a/XIVSlothCombo/Window/Functions/UserConfig.cs b/XIVSlothCombo/Window/Functions/UserConfig.cs index 4b372092e..a058ea271 100644 --- a/XIVSlothCombo/Window/Functions/UserConfig.cs +++ b/XIVSlothCombo/Window/Functions/UserConfig.cs @@ -1645,12 +1645,14 @@ internal static void Draw(CustomComboPreset preset, bool enabled) { UserConfig.DrawRadioButton(PLD.Config.PLD_ST_AtonementTiming, "Early Spend", "Uses Atonement before restarting the basic combo.", 1); UserConfig.DrawRadioButton(PLD.Config.PLD_ST_AtonementTiming, "Late Spend", "Uses Atonement before the end of the basic combo.", 2); + UserConfig.DrawRadioButton(PLD.Config.PLD_ST_AtonementTiming, "Alternate Spend", "Switches between early and and late depending on how often Flight or Fight is used.", 3); } if (preset == CustomComboPreset.PLD_ST_AdvancedMode_HolySpirit) { UserConfig.DrawRadioButton(PLD.Config.PLD_ST_DivineMightTiming, "Early Spend", "When under the effect of Divine Might, use Holy Spirit before restarting the basic combo.", 1); UserConfig.DrawRadioButton(PLD.Config.PLD_ST_DivineMightTiming, "Late Spend", "When under the effect of Divine Might, uses Holy Spirit before the end of the basic combo.", 2); + UserConfig.DrawRadioButton(PLD.Config.PLD_ST_DivineMightTiming, "Alternate Spend", "When under the effect of Divine Might, switches between early and late depending on how often Flight or Fight is used.", 3); } #endregion From a8ff401c82913b9f24a752f820e6cea8be58ef71 Mon Sep 17 00:00:00 2001 From: Taurenkey Date: Thu, 19 Oct 2023 08:18:39 +0100 Subject: [PATCH 06/14] Closes #1300 --- XIVSlothCombo/Combos/PvE/WAR.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/XIVSlothCombo/Combos/PvE/WAR.cs b/XIVSlothCombo/Combos/PvE/WAR.cs index 52f0ecf28..db672c337 100644 --- a/XIVSlothCombo/Combos/PvE/WAR.cs +++ b/XIVSlothCombo/Combos/PvE/WAR.cs @@ -3,6 +3,7 @@ using XIVSlothCombo.Combos.PvE.Content; using XIVSlothCombo.Core; using XIVSlothCombo.CustomComboNS; +using XIVSlothCombo.Extensions; namespace XIVSlothCombo.Combos.PvE { @@ -127,8 +128,11 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (IsEnabled(CustomComboPreset.WAR_ST_StormsPath_FellCleave) && LevelChecked(InnerBeast)) { - if (HasEffect(Buffs.InnerRelease) || HasEffect(Buffs.NascentChaos)) + if (HasEffect(Buffs.InnerRelease) || (HasEffect(Buffs.NascentChaos) && InnerChaos.LevelChecked())) return OriginalHook(InnerBeast); + + if (HasEffect(Buffs.NascentChaos) && !InnerChaos.LevelChecked()) + return OriginalHook(Decimate); } } From 021654549afdcb5cca9be48d742c4b0a1faa5168 Mon Sep 17 00:00:00 2001 From: Taurenkey Date: Thu, 19 Oct 2023 08:19:59 +0100 Subject: [PATCH 07/14] Change dictionary to concurrentdictionary for less errors? --- XIVSlothCombo/Data/CustomComboCache.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/XIVSlothCombo/Data/CustomComboCache.cs b/XIVSlothCombo/Data/CustomComboCache.cs index 204864afd..1e7b9c538 100644 --- a/XIVSlothCombo/Data/CustomComboCache.cs +++ b/XIVSlothCombo/Data/CustomComboCache.cs @@ -8,6 +8,7 @@ using FFXIVClientStructs.FFXIV.Client.Game; using XIVSlothCombo.Services; using Dalamud.Plugin.Services; +using System.Collections.Concurrent; namespace XIVSlothCombo.Data { @@ -17,13 +18,13 @@ internal partial class CustomComboCache : IDisposable private const uint InvalidObjectID = 0xE000_0000; // Invalidate these - private readonly Dictionary<(uint StatusID, uint? TargetID, uint? SourceID), DalamudStatus.Status?> statusCache = new(); - private readonly Dictionary cooldownCache = new(); + private readonly ConcurrentDictionary<(uint StatusID, uint? TargetID, uint? SourceID), DalamudStatus.Status?> statusCache = new(); + private readonly ConcurrentDictionary cooldownCache = new(); // Do not invalidate these - private readonly Dictionary cooldownGroupCache = new(); - private readonly Dictionary jobGaugeCache = new(); - private readonly Dictionary<(uint ActionID, uint ClassJobID, byte Level), (ushort CurrentMax, ushort Max)> chargesCache = new(); + private readonly ConcurrentDictionary cooldownGroupCache = new(); + private readonly ConcurrentDictionary jobGaugeCache = new(); + private readonly ConcurrentDictionary<(uint ActionID, uint ClassJobID, byte Level), (ushort CurrentMax, ushort Max)> chargesCache = new(); /// Initializes a new instance of the class. public CustomComboCache() => Service.Framework.Update += Framework_Update; From 616f04ea9fb2b933b2842d6a58112493b3f648ab Mon Sep 17 00:00:00 2001 From: Taurenkey Date: Thu, 19 Oct 2023 08:55:59 +0100 Subject: [PATCH 08/14] Resolves #1286 --- XIVSlothCombo/Combos/CustomComboPreset.cs | 9 +++++++-- XIVSlothCombo/Combos/PvP/WARPVP.cs | 16 +++++++++++++--- XIVSlothCombo/Window/Functions/UserConfig.cs | 6 ++++++ 3 files changed, 26 insertions(+), 5 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index d213f608a..11cb45e83 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -4184,8 +4184,13 @@ New features should be added to the appropriate sections. [SecretCustomCombo] [ParentCombo(WARPvP_BurstMode)] - [CustomComboInfo("Blota Option", "Removes Blota from Burst Mode if Primal Rend has 5 seconds or less on its cooldown.", WARPvP.JobID)] - WARPvP_BurstMode_Blota = 128002, + [CustomComboInfo("Blota Option", "Adds Blota to Burst Mode when not in melee range.", WARPvP.JobID)] + WARPvP_BurstMode_Blota = 128003, + + [SecretCustomCombo] + [ParentCombo(WARPvP_BurstMode)] + [CustomComboInfo("Primal Rend Option", "Adds Primal Rend to Burst Mode.", WARPvP.JobID)] + WARPvP_BurstMode_PrimalRend = 128004, // Last value = 128002 diff --git a/XIVSlothCombo/Combos/PvP/WARPVP.cs b/XIVSlothCombo/Combos/PvP/WARPVP.cs index 9f52f6a1f..2acd2d954 100644 --- a/XIVSlothCombo/Combos/PvP/WARPVP.cs +++ b/XIVSlothCombo/Combos/PvP/WARPVP.cs @@ -1,4 +1,6 @@ +using ECommons.DalamudServices; using XIVSlothCombo.CustomComboNS; +using XIVSlothCombo.CustomComboNS.Functions; namespace XIVSlothCombo.Combos.PvP { @@ -23,6 +25,12 @@ internal const ushort InnerRelease = 1303; } + public static class Config + { + public static UserInt + WARPVP_BlotaTiming = new("WARPVP_BlotaTiming"); + + } internal class WARPvP_BurstMode : CustomCombo { protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.WARPvP_BurstMode; @@ -36,11 +44,13 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb if (!GetCooldown(Bloodwhetting).IsCooldown && (IsEnabled(CustomComboPreset.WARPvP_BurstMode_Bloodwhetting) || canWeave)) return OriginalHook(Bloodwhetting); - if (!GetCooldown(PrimalRend).IsCooldown) + if (!InMeleeRange() && IsOffCooldown(Blota) && !TargetHasEffectAny(PvPCommon.Debuffs.Stun) && IsEnabled(CustomComboPreset.WARPvP_BurstMode_Blota) && Config.WARPVP_BlotaTiming == 0 && IsOffCooldown(PrimalRend)) + return OriginalHook(Blota); + + if (IsEnabled(CustomComboPreset.WARPvP_BurstMode_PrimalRend) && IsOffCooldown(PrimalRend)) return OriginalHook(PrimalRend); - if (!InMeleeRange() && !GetCooldown(Blota).IsCooldown && !TargetHasEffectAny(PvPCommon.Debuffs.Stun) && - (IsNotEnabled(CustomComboPreset.WARPvP_BurstMode_Blota) || GetCooldown(PrimalRend).CooldownRemaining >= 5)) + if (!InMeleeRange() && IsOffCooldown(Blota) && !TargetHasEffectAny(PvPCommon.Debuffs.Stun) && IsEnabled(CustomComboPreset.WARPvP_BurstMode_Blota) && Config.WARPVP_BlotaTiming == 1 && IsOnCooldown(PrimalRend)) return OriginalHook(Blota); if (!GetCooldown(Onslaught).IsCooldown && canWeave) diff --git a/XIVSlothCombo/Window/Functions/UserConfig.cs b/XIVSlothCombo/Window/Functions/UserConfig.cs index a058ea271..711005a7b 100644 --- a/XIVSlothCombo/Window/Functions/UserConfig.cs +++ b/XIVSlothCombo/Window/Functions/UserConfig.cs @@ -2187,6 +2187,12 @@ internal static void Draw(CustomComboPreset preset, bool enabled) if (preset == CustomComboPreset.WAR_AoE_Overpower_Infuriate) UserConfig.DrawSliderInt(0, 50, WAR.Config.WAR_InfuriateAoEGauge, "Use when gauge is under or equal to"); + if (preset == CustomComboPreset.WARPvP_BurstMode_Blota) + { + UserConfig.DrawHorizontalRadioButton(WARPvP.Config.WARPVP_BlotaTiming, "Before Primal Rend", "", 0); + UserConfig.DrawHorizontalRadioButton(WARPvP.Config.WARPVP_BlotaTiming, "After Primal Rend", "", 1); + } + #endregion // ==================================================================================== #region WHITE MAGE From 00f727682588e2df4d6bafe7a2e20bc09b00d68d Mon Sep 17 00:00:00 2001 From: Taurenkey Date: Thu, 19 Oct 2023 15:14:13 +0100 Subject: [PATCH 09/14] Fix image whinge error --- XIVSlothCombo/XIVSlothCombo.json | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/XIVSlothCombo/XIVSlothCombo.json b/XIVSlothCombo/XIVSlothCombo.json index c53f75d42..fdfba39ed 100644 --- a/XIVSlothCombo/XIVSlothCombo.json +++ b/XIVSlothCombo/XIVSlothCombo.json @@ -1,12 +1,11 @@ { - "Author": "Team Sloth", - "Name": "XIVSlothCombo", - "InternalName": "XIVSlothCombo", - "DalamudApiLevel": 9, - "Punchline": "Condenses combos and mutually exclusive abilities onto a single button - and then some.", - "Description": "Condenses combos and mutually exclusive abilities onto a single button - and then some.", - "RepoUrl": "https://github.com/Nik-Potokar/XIVSlothCombo", - "IconUrl": "https://i.imgur.com/iEcxM81.png", - "ImageUrls": [ "https://i.imgur.com/iEcxM81.png" ], - "Changelog": "Features, Fixes & Enhancements for Framework, AST, ASTPvP, RDM, SGE and SCH. Please check the project's GitHub or Discord for a full changelog." + "Author": "Team Sloth", + "Name": "XIVSlothCombo", + "InternalName": "XIVSlothCombo", + "DalamudApiLevel": 9, + "Punchline": "Condenses combos and mutually exclusive abilities onto a single button - and then some.", + "Description": "Condenses combos and mutually exclusive abilities onto a single button - and then some.", + "RepoUrl": "https://github.com/Nik-Potokar/XIVSlothCombo", + "IconUrl": "https://raw.githubusercontent.com/Nik-Potokar/XIVSlothCombo/main/res/plugin/xivslothcombo.png", + "Changelog": "Features, Fixes & Enhancements for Framework, AST, ASTPvP, RDM, SGE and SCH. Please check the project's GitHub or Discord for a full changelog." } From dc5daf62431b416e62535186f85cffe01b5d18a2 Mon Sep 17 00:00:00 2001 From: Taurenkey Date: Thu, 19 Oct 2023 17:01:38 +0100 Subject: [PATCH 10/14] Possibly resolves #1278 --- XIVSlothCombo/Combos/CustomComboPreset.cs | 1 + XIVSlothCombo/Combos/PvE/BRD.cs | 30 ++++++++--------------- 2 files changed, 11 insertions(+), 20 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index 11cb45e83..52f167c3e 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -652,6 +652,7 @@ public enum CustomComboPreset [CustomComboInfo("Bard Buffs Feature", "Adds Raging Strikes and Battle Voice onto Barrage.", BRD.JobID, 0, "", "")] BRD_Buffs = 3013, + [ReplaceSkill(BRD.WanderersMinuet)] [CustomComboInfo("One Button Songs Feature", "Add Mage's Ballad and Army's Paeon to Wanderer's Minuet depending on cooldowns.", BRD.JobID, 0, "", "")] BRD_OneButtonSongs = 3014, diff --git a/XIVSlothCombo/Combos/PvE/BRD.cs b/XIVSlothCombo/Combos/PvE/BRD.cs index 6ea696f3d..1dbdf21d6 100644 --- a/XIVSlothCombo/Combos/PvE/BRD.cs +++ b/XIVSlothCombo/Combos/PvE/BRD.cs @@ -1,10 +1,12 @@ -using System; using Dalamud.Game.ClientState.JobGauge.Enums; using Dalamud.Game.ClientState.JobGauge.Types; using Dalamud.Game.ClientState.Statuses; +using System; +using System.Linq; using XIVSlothCombo.Combos.PvE.Content; using XIVSlothCombo.Core; using XIVSlothCombo.CustomComboNS; +using XIVSlothCombo.Data; namespace XIVSlothCombo.Combos.PvE { @@ -828,31 +830,19 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim // Doesn't display the lowest cooldown song if they have been used out of order and are all on cooldown. BRDGauge? gauge = GetJobGauge(); int songTimerInSeconds = gauge.SongTimer / 1000; - bool songWanderer = gauge.Song != Song.WANDERER; - bool canUse = (songWanderer || songTimerInSeconds < 3) && !JustUsed(WanderersMinuet); bool wanderersMinuetReady = LevelChecked(WanderersMinuet) && IsOffCooldown(WanderersMinuet); bool magesBalladReady = LevelChecked(MagesBallad) && IsOffCooldown(MagesBallad); bool armysPaeonReady = LevelChecked(ArmysPaeon) && IsOffCooldown(ArmysPaeon); - if (wanderersMinuetReady) + if (wanderersMinuetReady || (gauge.Song == Song.WANDERER && songTimerInSeconds > 2)) return WanderersMinuet; - if (canUse) - { - if (magesBalladReady) - { - if (songWanderer && gauge.Repertoire > 0) - return OriginalHook(WanderersMinuet); - return MagesBallad; - } - - if (armysPaeonReady) - { - if (songWanderer && gauge.Repertoire > 0) - return OriginalHook(WanderersMinuet); - return ArmysPaeon; - } - } + if (magesBalladReady || (gauge.Song == Song.MAGE && songTimerInSeconds > 11)) + return MagesBallad; + + if (armysPaeonReady || (gauge.Song == Song.ARMY && songTimerInSeconds > 2)) + return ArmysPaeon; + } return actionID; From 01e14dfe5d67bcb235521174a8866f36d24d3d60 Mon Sep 17 00:00:00 2001 From: Taurenkey Date: Thu, 19 Oct 2023 17:16:11 +0100 Subject: [PATCH 11/14] Resolves #1270 --- XIVSlothCombo/Combos/PvE/MNK.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/XIVSlothCombo/Combos/PvE/MNK.cs b/XIVSlothCombo/Combos/PvE/MNK.cs index aa88072e8..9d1300007 100644 --- a/XIVSlothCombo/Combos/PvE/MNK.cs +++ b/XIVSlothCombo/Combos/PvE/MNK.cs @@ -5,6 +5,7 @@ using XIVSlothCombo.Combos.PvE.Content; using XIVSlothCombo.Core; using XIVSlothCombo.CustomComboNS; +using XIVSlothCombo.Extensions; namespace XIVSlothCombo.Combos.PvE { @@ -229,9 +230,15 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return OriginalHook(ArmOfTheDestroyer); } - if (HasEffect(Buffs.RaptorForm) && level >= Levels.FourPointFury) + + + if (HasEffect(Buffs.RaptorForm)) { + if (FourPointFury.LevelChecked()) return FourPointFury; + + if (TwinSnakes.LevelChecked()) + return TwinSnakes; } if (HasEffect(Buffs.CoerlForm) && level >= Levels.Rockbreaker) From 29cab7aa2490912ad2310e83740a42d761e5e1df Mon Sep 17 00:00:00 2001 From: Taurenkey Date: Fri, 20 Oct 2023 07:47:53 +0100 Subject: [PATCH 12/14] Fix WHM ST issues, simplify opener --- XIVSlothCombo/Combos/PvE/MNK.cs | 2 -- XIVSlothCombo/Combos/PvE/WHM.cs | 27 ++++++++------------------- 2 files changed, 8 insertions(+), 21 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/MNK.cs b/XIVSlothCombo/Combos/PvE/MNK.cs index 9d1300007..3d0732601 100644 --- a/XIVSlothCombo/Combos/PvE/MNK.cs +++ b/XIVSlothCombo/Combos/PvE/MNK.cs @@ -230,8 +230,6 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return OriginalHook(ArmOfTheDestroyer); } - - if (HasEffect(Buffs.RaptorForm)) { if (FourPointFury.LevelChecked()) diff --git a/XIVSlothCombo/Combos/PvE/WHM.cs b/XIVSlothCombo/Combos/PvE/WHM.cs index 6287fd00d..ebb212aa3 100644 --- a/XIVSlothCombo/Combos/PvE/WHM.cs +++ b/XIVSlothCombo/Combos/PvE/WHM.cs @@ -2,9 +2,12 @@ using Dalamud.Game.ClientState.Objects.Types; using Dalamud.Game.ClientState.Statuses; using System.Collections.Generic; +using System.Linq; using XIVSlothCombo.Combos.PvE.Content; using XIVSlothCombo.CustomComboNS; using XIVSlothCombo.CustomComboNS.Functions; +using XIVSlothCombo.Data; +using XIVSlothCombo.Extensions; namespace XIVSlothCombo.Combos.PvE { @@ -203,8 +206,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim internal class WHM_ST_MainCombo : CustomCombo { protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.WHM_ST_MainCombo; - internal static uint glare3Count = 0; - internal static bool usedGlare3 = false; + internal static int glare3Count => ActionWatching.CombatActions.Count(x => x == Glare3); protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) { @@ -225,24 +227,9 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim bool openerDelayComplete = glare3Count >= 3; bool liliesFull = gauge.Lily == 3; bool liliesNearlyFull = gauge.Lily == 2 && gauge.LilyTimer >= 17000; - float glare3CD = GetCooldownRemainingTime(Glare3); - // No-Swift Opener - // Counter reset - if (!InCombat()) glare3Count = 0; - - // Check Glare3 use - if (InCombat() && usedGlare3 == false && lastComboMove == Glare3 && glare3CD > 1) - { - usedGlare3 = true; // Registers that Glare3 was used and blocks further incrementation of glare3Count - glare3Count++; // Increments Glare3 counter - } - - // Check Glare3 use reset - if (usedGlare3 == true && glare3CD < 1) usedGlare3 = false; // Resets block to allow "Check Glare3 use" - - // Bypass counter when disabled - if (IsNotEnabled(CustomComboPreset.WHM_ST_MainCombo_NoSwiftOpener) || !LevelChecked(Glare3)) glare3Count = 3; + if (!openerDelayComplete && IsEnabled(CustomComboPreset.WHM_ST_MainCombo_NoSwiftOpener) && Glare3.LevelChecked()) + return OriginalHook(Glare3); if (CanSpellWeave(actionID) && openerDelayComplete) { @@ -294,6 +281,8 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (IsEnabled(CustomComboPreset.WHM_ST_MainCombo_Misery_oGCD) && LevelChecked(AfflatusMisery) && gauge.BloodLily >= 3 && openerDelayComplete) return AfflatusMisery; + + return OriginalHook(Stone1); } return actionID; From a48bdb906cfcfecb10fbdd5d15558d4ecf0f3dc3 Mon Sep 17 00:00:00 2001 From: Taurenkey Date: Fri, 20 Oct 2023 14:37:33 +0100 Subject: [PATCH 13/14] Rework WHM opener --- XIVSlothCombo/Combos/CustomComboPreset.cs | 7 ++- XIVSlothCombo/Combos/PvE/WHM.cs | 45 ++++++++++++++++---- XIVSlothCombo/Data/ActionWatching.cs | 2 +- XIVSlothCombo/Window/Functions/UserConfig.cs | 3 ++ 4 files changed, 44 insertions(+), 13 deletions(-) diff --git a/XIVSlothCombo/Combos/CustomComboPreset.cs b/XIVSlothCombo/Combos/CustomComboPreset.cs index 52f167c3e..bb295238e 100644 --- a/XIVSlothCombo/Combos/CustomComboPreset.cs +++ b/XIVSlothCombo/Combos/CustomComboPreset.cs @@ -3509,9 +3509,8 @@ New features should be added to the appropriate sections. WHM_ST_MainCombo = 19099, [ParentCombo(WHM_ST_MainCombo)] - [CustomComboInfo("Glare III Opener Option", "Delays all oGCDs until after third Glare III cast." + - "\nOnly works with Glare III.", WHM.JobID, 11, "", "")] - WHM_ST_MainCombo_NoSwiftOpener = 19023, + [CustomComboInfo("Opener Option", "Use the Balance opener from level 56+.", WHM.JobID, 11, "", "")] + WHM_ST_MainCombo_Opener = 19023, [ParentCombo(WHM_ST_MainCombo)] [CustomComboInfo("Aero/Dia Uptime Option", "Adds Aero/Dia to the single target combo if the debuff is not present on current target, or is about to expire.", WHM.JobID, 12, "", "")] @@ -3665,7 +3664,7 @@ New features should be added to the appropriate sections. [CustomComboInfo("Rampart Option", "Use Variant Rampart on cooldown.", WHM.JobID)] WHM_DPS_Variant_Rampart = 19026, - // Last value = 19026 + // Last value = 19027 #endregion diff --git a/XIVSlothCombo/Combos/PvE/WHM.cs b/XIVSlothCombo/Combos/PvE/WHM.cs index ebb212aa3..89d82f1fb 100644 --- a/XIVSlothCombo/Combos/PvE/WHM.cs +++ b/XIVSlothCombo/Combos/PvE/WHM.cs @@ -49,7 +49,7 @@ public const uint //Action Groups internal static readonly List - StoneGlareList = new() { Stone1, Stone2, Stone3, Stone4, Glare1, Glare3 }; + StoneGlareList = [Stone1, Stone2, Stone3, Stone4, Glare1, Glare3]; public static class Buffs { @@ -90,7 +90,8 @@ internal static UserBool WHM_ST_MainCombo_DoT_Adv = new("WHM_ST_MainCombo_DoT_Adv"), WHM_ST_MainCombo_Adv = new("WHM_ST_MainCombo_Adv"), WHM_Afflatus_Adv = new("WHM_Afflatus_Adv"), - WHM_Afflatus_UIMouseOver = new("WHM_Afflatus_UIMouseOver"); + WHM_Afflatus_UIMouseOver = new("WHM_Afflatus_UIMouseOver"), + WHM_ST_Opener_Swiftcast = new("WHM_ST_Opener_Swiftcast"); internal static UserFloat WHM_ST_MainCombo_DoT_Threshold = new("WHM_ST_MainCombo_DoT_Threshold"); public static UserBoolArray @@ -206,7 +207,8 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim internal class WHM_ST_MainCombo : CustomCombo { protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.WHM_ST_MainCombo; - internal static int glare3Count => ActionWatching.CombatActions.Count(x => x == Glare3); + internal static int Glare3Count => ActionWatching.CombatActions.Count(x => x == OriginalHook(Glare3)); + internal static int DiaCount => ActionWatching.CombatActions.Count(x => x == OriginalHook(Dia)); protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level) { @@ -224,14 +226,41 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (ActionFound) { WHMGauge? gauge = GetJobGauge(); - bool openerDelayComplete = glare3Count >= 3; + bool inOpener = IsEnabled(CustomComboPreset.WHM_ST_MainCombo_Opener) && Glare3Count < 4; bool liliesFull = gauge.Lily == 3; bool liliesNearlyFull = gauge.Lily == 2 && gauge.LilyTimer >= 17000; - if (!openerDelayComplete && IsEnabled(CustomComboPreset.WHM_ST_MainCombo_NoSwiftOpener) && Glare3.LevelChecked()) - return OriginalHook(Glare3); + if (inOpener && ActionReady(Assize) && ActionReady(PresenceOfMind)) + { + if (Glare3Count == 0) + return OriginalHook(Glare3); + + if (DiaCount == 0) + return OriginalHook(Dia); + + if (Glare3Count == 3 && CanWeave(actionID)) + { + if (ActionReady(All.Swiftcast) && Config.WHM_ST_Opener_Swiftcast) + return OriginalHook(All.Swiftcast); + + return PresenceOfMind; + } + + if (Glare3Count == 4) + { + if (ActionReady(PresenceOfMind) && Config.WHM_ST_Opener_Swiftcast) + return OriginalHook(PresenceOfMind); + + return Assize; + } + + if (Glare3Count > 0) + return OriginalHook(Glare3); + + + } - if (CanSpellWeave(actionID) && openerDelayComplete) + if (CanSpellWeave(actionID)) { bool lucidReady = IsOffCooldown(All.LucidDreaming) && LevelChecked(All.LucidDreaming) && LocalPlayer.CurrentMp <= Config.WHM_ST_Lucid; bool pomReady = LevelChecked(PresenceOfMind) && IsOffCooldown(PresenceOfMind); @@ -279,7 +308,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim (liliesFull || liliesNearlyFull)) return AfflatusRapture; if (IsEnabled(CustomComboPreset.WHM_ST_MainCombo_Misery_oGCD) && LevelChecked(AfflatusMisery) && - gauge.BloodLily >= 3 && openerDelayComplete) + gauge.BloodLily >= 3) return AfflatusMisery; return OriginalHook(Stone1); diff --git a/XIVSlothCombo/Data/ActionWatching.cs b/XIVSlothCombo/Data/ActionWatching.cs index e21e6ee48..6467386e8 100644 --- a/XIVSlothCombo/Data/ActionWatching.cs +++ b/XIVSlothCombo/Data/ActionWatching.cs @@ -37,9 +37,9 @@ public static class ActionWatching private readonly static Hook? ReceiveActionEffectHook; private static void ReceiveActionEffectDetour(int sourceObjectId, IntPtr sourceActor, IntPtr position, IntPtr effectHeader, IntPtr effectArray, IntPtr effectTrail) { + if (!CustomComboFunctions.InCombat()) CombatActions.Clear(); ReceiveActionEffectHook!.Original(sourceObjectId, sourceActor, position, effectHeader, effectArray, effectTrail); TimeLastActionUsed = DateTime.Now; - if (!CustomComboFunctions.InCombat()) CombatActions.Clear(); ActionEffectHeader header = Marshal.PtrToStructure(effectHeader); if (ActionType is 13 or 2) return; diff --git a/XIVSlothCombo/Window/Functions/UserConfig.cs b/XIVSlothCombo/Window/Functions/UserConfig.cs index 1dc926295..d22b9f409 100644 --- a/XIVSlothCombo/Window/Functions/UserConfig.cs +++ b/XIVSlothCombo/Window/Functions/UserConfig.cs @@ -2251,6 +2251,9 @@ internal static void Draw(CustomComboPreset preset, bool enabled) if (preset == CustomComboPreset.WHM_Medica_ThinAir) UserConfig.DrawSliderInt(0, 1, WHM.Config.WHM_Medica_ThinAir, "How many charges to keep ready? (0 = Use all)"); + if (preset == CustomComboPreset.WHM_ST_MainCombo_Opener) + UserConfig.DrawAdditionalBoolChoice(WHM.Config.WHM_ST_Opener_Swiftcast, "Swiftcast Option", "Adds Swiftcast to the opener."); + #endregion // ==================================================================================== #region DOH From 4da4cd746eda3e3d670d661fcb18d8a9912f4ba1 Mon Sep 17 00:00:00 2001 From: Taurenkey Date: Fri, 20 Oct 2023 14:45:12 +0100 Subject: [PATCH 14/14] Adjust default WHM ST action (outside combat) --- XIVSlothCombo/Combos/PvE/WHM.cs | 57 +++++++++++++++++---------------- 1 file changed, 30 insertions(+), 27 deletions(-) diff --git a/XIVSlothCombo/Combos/PvE/WHM.cs b/XIVSlothCombo/Combos/PvE/WHM.cs index 89d82f1fb..cd92f041f 100644 --- a/XIVSlothCombo/Combos/PvE/WHM.cs +++ b/XIVSlothCombo/Combos/PvE/WHM.cs @@ -230,7 +230,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim bool liliesFull = gauge.Lily == 3; bool liliesNearlyFull = gauge.Lily == 2 && gauge.LilyTimer >= 17000; - if (inOpener && ActionReady(Assize) && ActionReady(PresenceOfMind)) + if (inOpener) { if (Glare3Count == 0) return OriginalHook(Glare3); @@ -243,6 +243,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (ActionReady(All.Swiftcast) && Config.WHM_ST_Opener_Swiftcast) return OriginalHook(All.Swiftcast); + if (ActionReady(PresenceOfMind)) return PresenceOfMind; } @@ -251,13 +252,12 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim if (ActionReady(PresenceOfMind) && Config.WHM_ST_Opener_Swiftcast) return OriginalHook(PresenceOfMind); + if (ActionReady(Assize)) return Assize; } if (Glare3Count > 0) return OriginalHook(Glare3); - - } if (CanSpellWeave(actionID)) @@ -284,34 +284,37 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim return All.LucidDreaming; } - // DoTs - if (IsEnabled(CustomComboPreset.WHM_ST_MainCombo_DoT) && InCombat() && LevelChecked(Aero) && HasBattleTarget()) + if (InCombat()) { - Status? sustainedDamage = FindTargetEffect(Variant.Debuffs.SustainedDamage); - if (IsEnabled(CustomComboPreset.WHM_DPS_Variant_SpiritDart) && - IsEnabled(Variant.VariantSpiritDart) && - (sustainedDamage is null || sustainedDamage?.RemainingTime <= 3) && - CanSpellWeave(actionID)) - return Variant.VariantSpiritDart; + // DoTs + if (IsEnabled(CustomComboPreset.WHM_ST_MainCombo_DoT) && LevelChecked(Aero) && HasBattleTarget()) + { + Status? sustainedDamage = FindTargetEffect(Variant.Debuffs.SustainedDamage); + if (IsEnabled(CustomComboPreset.WHM_DPS_Variant_SpiritDart) && + IsEnabled(Variant.VariantSpiritDart) && + (sustainedDamage is null || sustainedDamage?.RemainingTime <= 3) && + CanSpellWeave(actionID)) + return Variant.VariantSpiritDart; + + uint dot = OriginalHook(Aero); //Grab the appropriate DoT Action + Status? dotDebuff = FindTargetEffect(AeroList[dot]); //Match it with it's Debuff ID, and check for the Debuff + + // DoT Uptime & HP% threshold + float refreshtimer = Config.WHM_ST_MainCombo_DoT_Adv ? Config.WHM_ST_MainCombo_DoT_Threshold : 3; + if ((dotDebuff is null || dotDebuff.RemainingTime <= refreshtimer) && + GetTargetHPPercent() > Config.WHM_ST_MainCombo_DoT) + return OriginalHook(Aero); + } - uint dot = OriginalHook(Aero); //Grab the appropriate DoT Action - Status? dotDebuff = FindTargetEffect(AeroList[dot]); //Match it with it's Debuff ID, and check for the Debuff + if (IsEnabled(CustomComboPreset.WHM_ST_MainCombo_LilyOvercap) && LevelChecked(AfflatusRapture) && + (liliesFull || liliesNearlyFull)) + return AfflatusRapture; + if (IsEnabled(CustomComboPreset.WHM_ST_MainCombo_Misery_oGCD) && LevelChecked(AfflatusMisery) && + gauge.BloodLily >= 3) + return AfflatusMisery; - // DoT Uptime & HP% threshold - float refreshtimer = Config.WHM_ST_MainCombo_DoT_Adv ? Config.WHM_ST_MainCombo_DoT_Threshold : 3; - if ((dotDebuff is null || dotDebuff.RemainingTime <= refreshtimer) && - GetTargetHPPercent() > Config.WHM_ST_MainCombo_DoT) - return OriginalHook(Aero); + return OriginalHook(Stone1); } - - if (IsEnabled(CustomComboPreset.WHM_ST_MainCombo_LilyOvercap) && LevelChecked(AfflatusRapture) && - (liliesFull || liliesNearlyFull)) - return AfflatusRapture; - if (IsEnabled(CustomComboPreset.WHM_ST_MainCombo_Misery_oGCD) && LevelChecked(AfflatusMisery) && - gauge.BloodLily >= 3) - return AfflatusMisery; - - return OriginalHook(Stone1); } return actionID;