From e665864ce46b6d92c66731e13cbbcf58e4e9eda7 Mon Sep 17 00:00:00 2001 From: Jaycee <97761792+arty-maus@users.noreply.github.com> Date: Thu, 8 Aug 2024 23:11:31 -0500 Subject: [PATCH] Add Glare IV Combo and Glare of Mind presets for WHM (#114) Include new custom combo presets to replace Glare with Glare IV when under Sacred Sight and replace Glare with Presence of Mind when off cooldown. Update WHM Levels constants to support these changes. --- XIVComboVX/Combos/WHM.cs | 18 +++++++++++++++--- XIVComboVX/CustomComboPreset.cs | 6 ++++++ 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/XIVComboVX/Combos/WHM.cs b/XIVComboVX/Combos/WHM.cs index f103c99b..9004cbd7 100644 --- a/XIVComboVX/Combos/WHM.cs +++ b/XIVComboVX/Combos/WHM.cs @@ -44,7 +44,7 @@ public const ushort } public static class Debuffs { - public const ushort + public const ushort Aero = 143, Aero2 = 144, Dia = 1871; @@ -52,6 +52,7 @@ public const ushort public static class Levels { public const byte + PresenceOfMind = 30, Cure2 = 30, AfflatusSolace = 52, AfflatusMisery = 74, @@ -86,7 +87,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionId, float comb if (Common.CheckLucidWeave(CustomComboPreset.WhiteMageLucidWeave, level, Service.Configuration.WhiteMageLucidWeaveManaThreshold, actionID)) return Common.LucidDreaming; - + if (IsEnabled(CustomComboPreset.WhiteMageDotRefresh)){ ushort effectIdToTrack = OriginalHook(WHM.Aero) switch { WHM.Aero => WHM.Debuffs.Aero, @@ -94,11 +95,22 @@ protected override uint Invoke(uint actionID, uint lastComboActionId, float comb WHM.Dia => WHM.Debuffs.Dia, _ => 0, }; - + if (effectIdToTrack > 0 && HasTarget && TargetOwnEffectDuration(effectIdToTrack) < Service.Configuration.WhiteMageDotRefreshDuration) return OriginalHook(WHM.Aero); } + if (IsEnabled(CustomComboPreset.WhiteMageGlareIVCombo)) { + if (level >= WHM.Levels.Glare4 && SelfHasEffect(WHM.Buffs.SacredSight)) + return WHM.Glare4; + } + + if (IsEnabled(CustomComboPreset.WhiteMageGlareOfMind)) { + if (level >= WHM.Levels.PresenceOfMind && IsOffCooldown(WHM.PresenceOfMind)) + return WHM.PresenceOfMind; + } + + return actionID; } } diff --git a/XIVComboVX/CustomComboPreset.cs b/XIVComboVX/CustomComboPreset.cs index 8a2f1612..7a569cb4 100644 --- a/XIVComboVX/CustomComboPreset.cs +++ b/XIVComboVX/CustomComboPreset.cs @@ -1553,6 +1553,12 @@ public enum CustomComboPreset { [CustomComboInfo("Divine Temperance", "Replace Temperance with Divine Caress when under Divine Grace.", WHM.JobID)] WhiteMageTemperanceDivineCaress = 24009, + [CustomComboInfo("Glare IV Combo", "Replace Glare with Glare IV when under Sacred Sight.", WHM.JobID)] + WhiteMageGlareIVCombo = 24010, + + [CustomComboInfo("Glare of Mind", "Replace Glare with Presence of Mind when off cooldown", WHM.JobID)] + WhiteMageGlareOfMind = 24011, + #endregion // ==================================================================================== #region DoH (98xxx)