Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Commit

Permalink
Merge commit 'refs/pull/1449/head' of https://github.com/Nik-Potokar/…
Browse files Browse the repository at this point in the history
  • Loading branch information
Taurenkey committed Jul 11, 2024
2 parents bb6d4d4 + af39390 commit c6f3405
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 28 deletions.
38 changes: 27 additions & 11 deletions XIVSlothCombo/Combos/CustomComboPreset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3838,19 +3838,23 @@ The three digets after RDM.JobID can be used to reorder items in the list
WHM_ST_MainCombo_Assize = 19009,

[ParentCombo(WHM_ST_MainCombo)]
[CustomComboInfo("Afflatus Misery Option", "Adds Afflatus Misery to the single target combo when it is ready to be used.", WHM.JobID, 14, "", "")]
[CustomComboInfo("Glare IV Option", "Adds Glare IV to the single target combo when under Sacred Sight", WHM.JobID, 14, "", "")]
WHM_ST_MainCombo_GlareIV = 19015,

[ParentCombo(WHM_ST_MainCombo)]
[CustomComboInfo("Afflatus Misery Option", "Adds Afflatus Misery to the single target combo when it is ready to be used.", WHM.JobID, 15, "", "")]
WHM_ST_MainCombo_Misery_oGCD = 19017,

[ParentCombo(WHM_ST_MainCombo)]
[CustomComboInfo("Lily Overcap Protection Option", "Adds Afflatus Rapture to the single target combo when at three Lilies.", WHM.JobID, 15, "", "")]
[CustomComboInfo("Lily Overcap Protection Option", "Adds Afflatus Rapture to the single target combo when at three Lilies.", WHM.JobID, 16, "", "")]
WHM_ST_MainCombo_LilyOvercap = 19016,

[ParentCombo(WHM_ST_MainCombo)]
[CustomComboInfo("Presence of Mind Option", "Adds Presence of Mind to the single target combo.", WHM.JobID, 16, "", "")]
[CustomComboInfo("Presence of Mind Option", "Adds Presence of Mind to the single target combo.", WHM.JobID, 17, "", "")]
WHM_ST_MainCombo_PresenceOfMind = 19008,

[ParentCombo(WHM_ST_MainCombo)]
[CustomComboInfo("Lucid Dreaming Option", "Adds Lucid Dreaming to the single target combo when below set MP value.", WHM.JobID, 17, "", "")]
[CustomComboInfo("Lucid Dreaming Option", "Adds Lucid Dreaming to the single target combo when below set MP value.", WHM.JobID, 18, "", "")]
WHM_ST_MainCombo_Lucid = 19006,

#endregion
Expand All @@ -3866,19 +3870,23 @@ The three digets after RDM.JobID can be used to reorder items in the list
WHM_AoE_DPS_Assize = 19192,

[ParentCombo(WHM_AoE_DPS)]
[CustomComboInfo("Afflatus Misery Option", "Adds Afflatus Misery to the AoE combo when it is ready to be used.", WHM.JobID, 22, "", "")]
[CustomComboInfo("Glare IV Option", "Adds Glare IV to the AoE combo when under Sacred Sight", WHM.JobID, 22, "", "")]
WHM_AoE_DPS_GlareIV = 19196,

[ParentCombo(WHM_AoE_DPS)]
[CustomComboInfo("Afflatus Misery Option", "Adds Afflatus Misery to the AoE combo when it is ready to be used.", WHM.JobID, 23, "", "")]
WHM_AoE_DPS_Misery = 19194,

[ParentCombo(WHM_AoE_DPS)]
[CustomComboInfo("Lily Overcap Protection Option", "Adds Afflatus Rapture to the AoE combo when at three Lilies.", WHM.JobID, 23, "", "")]
[CustomComboInfo("Lily Overcap Protection Option", "Adds Afflatus Rapture to the AoE combo when at three Lilies.", WHM.JobID, 24, "", "")]
WHM_AoE_DPS_LilyOvercap = 19193,

[ParentCombo(WHM_AoE_DPS)]
[CustomComboInfo("Presence of Mind Option", "Adds Presence of Mind to the AoE combo if you are moving or it can be weaved without GCD delay.", WHM.JobID, 24, "", "")]
[CustomComboInfo("Presence of Mind Option", "Adds Presence of Mind to the AoE combo if you are moving or it can be weaved without GCD delay.", WHM.JobID, 25, "", "")]
WHM_AoE_DPS_PresenceOfMind = 19195,

[ParentCombo(WHM_AoE_DPS)]
[CustomComboInfo("Lucid Dreaming Option", "Adds Lucid Dreaming to the AoE combo when below the set MP value if you are moving or it can be weaved without GCD delay.", WHM.JobID, 25, "", "")]
[CustomComboInfo("Lucid Dreaming Option", "Adds Lucid Dreaming to the AoE combo when below the set MP value if you are moving or it can be weaved without GCD delay.", WHM.JobID, 26, "", "")]
WHM_AoE_DPS_Lucid = 19191,

#endregion
Expand All @@ -3893,7 +3901,7 @@ The three digets after RDM.JobID can be used to reorder items in the list

#region AoE Heals Feature

[ReplaceSkill(WHM.Medica)]
[ReplaceSkill(WHM.Medica1)]
[CustomComboInfo("Simple Heals (AoE)", "Replaces Medica with a one button AoE healing setup.", WHM.JobID, 4, "", "")]
WHM_AoEHeals = 19007,

Expand Down Expand Up @@ -3922,13 +3930,21 @@ The three digets after RDM.JobID can be used to reorder items in the list
WHM_AoEHeals_Plenary = 19203,

[ParentCombo(WHM_AoEHeals)]
[CustomComboInfo("Lucid Dreaming Option", "Uses Lucid Dreaming when available.", WHM.JobID, 8)]
[CustomComboInfo("Lucid Dreaming Option", "Uses Lucid Dreaming when available.", WHM.JobID, 9)]
WHM_AoEHeals_Lucid = 19204,

[ParentCombo(WHM_AoEHeals)]
[CustomComboInfo("Medica II Option", "Uses Medica II when current target doesn't have Medica II buff.", WHM.JobID, 1)]
WHM_AoEHeals_Medica2 = 19205,

[ParentCombo(WHM_AoEHeals_Medica2)]
[CustomComboInfo("Medica III Option", "Upgrades to Medica III when level allows.", WHM.JobID)]
WHM_AoEHeals_Medica3 = 19206,

[ParentCombo(WHM_AoEHeals)]
[CustomComboInfo("Divine Caress", "Uses Divine Caress when Divine Grace from Temperance is active.", WHM.JobID, 8)]
WHM_AoEHeals_DivineCaress = 19207,

#endregion

#region Single Target Heals
Expand Down Expand Up @@ -3962,7 +3978,7 @@ The three digets after RDM.JobID can be used to reorder items in the list
WHM_STHeals_Benison = 19306,

[ParentCombo(WHM_STHeals)]
[CustomComboInfo("Aqualveil Option", "Uses Aquaveil when available.", WHM.JobID)]
[CustomComboInfo("Aquaveil Option", "Uses Aquaveil when available.", WHM.JobID)]
WHM_STHeals_Aquaveil = 19307,

[ParentCombo(WHM_STHeals)]
Expand Down
57 changes: 44 additions & 13 deletions XIVSlothCombo/Combos/PvE/WHM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ internal static class WHM
public const uint
// Heals
Cure = 120,
Medica = 124,
Cure2 = 135,
Cure3 = 131,
Regen = 137,
Expand All @@ -29,12 +28,15 @@ public const uint
AfflatusMisery = 16535,
Medica1 = 124,
Medica2 = 133,
Medica3 = 37010,
Tetragrammaton = 3570,
DivineBenison = 7432,
Aquaveil = 25861,
DivineCaress = 37011,
// DPS
Glare1 = 16533,
Glare3 = 25859,
Glare4 = 37009,
Stone1 = 119,
Stone2 = 127,
Stone3 = 3568,
Expand All @@ -60,10 +62,13 @@ public static class Buffs
public const ushort
Regen = 158,
Medica2 = 150,
Medica3 = 3880,
PresenceOfMind = 157,
ThinAir = 1217,
DivineBenison = 1218,
Aquaveil = 2708;
Aquaveil = 2708,
SacredSight = 3879,
DivineGrace = 3881;
}

public static class Debuffs
Expand All @@ -82,8 +87,6 @@ internal static readonly Dictionary<uint, ushort>
{ Dia, Debuffs.Dia }
};



public static class Config
{
internal static UserInt
Expand Down Expand Up @@ -111,11 +114,11 @@ internal static UserBool
WHM_STHeals_AquaveilWeave = new("WHM_STHeals_AquaveilWeave"),
WHM_AoEHeals_PlenaryWeave = new("WHM_AoEHeals_PlenaryWeave"),
WHM_AoEHeals_AssizeWeave = new("WHM_AoEHeals_AssizeWeave"),
WHM_AoEHeals_Medica2MO = new("WHM_AoEHeals_Medica2MO");
WHM_AoEHeals_MedicaMO = new("WHM_AoEHeals_MedicaMO");
internal static UserFloat
WHM_ST_MainCombo_DoT_Threshold = new("WHM_ST_MainCombo_DoT_Threshold"),
WHM_STHeals_RegenTimer = new("WHM_STHeals_RegenTimer"),
WHM_AoEHeals_Medica2Time = new("WHM_AoEHeals_Medica2Time");
WHM_AoEHeals_MedicaTime = new("WHM_AoEHeals_MedicaTime");
public static UserBoolArray
WHM_ST_MainCombo_Adv_Actions = new("WHM_ST_MainCombo_Adv_Actions");
}
Expand Down Expand Up @@ -160,7 +163,6 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim
}
}


internal class WHM_Raise : CustomCombo
{
protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.WHM_Raise;
Expand Down Expand Up @@ -203,7 +205,9 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim
if (ActionFound)
{
WHMGauge? gauge = GetJobGauge<WHMGauge>();
bool inOpener = IsEnabled(CustomComboPreset.WHM_ST_MainCombo_Opener) && Glare3Count < 4;
bool inOpener = IsEnabled(CustomComboPreset.WHM_ST_MainCombo_Opener)
&& Glare3Count < 4
&& !HasEffect(Buffs.SacredSight);
bool liliesFull = gauge.Lily == 3;
bool liliesNearlyFull = gauge.Lily == 2 && gauge.LilyTimer >= 17000;

Expand All @@ -221,7 +225,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim
return OriginalHook(All.Swiftcast);

if (ActionReady(PresenceOfMind))
return PresenceOfMind;
return PresenceOfMind;
}

if (Glare3Count == 4)
Expand All @@ -239,7 +243,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim

if (CanSpellWeave(actionID))
{
bool lucidReady = IsOffCooldown(All.LucidDreaming) && LevelChecked(All.LucidDreaming) && LocalPlayer.CurrentMp <= Config.WHM_STDPS_Lucid;
bool lucidReady = ActionReady(All.LucidDreaming) && LevelChecked(All.LucidDreaming) && LocalPlayer.CurrentMp <= Config.WHM_STHeals_Lucid;
bool pomReady = LevelChecked(PresenceOfMind) && IsOffCooldown(PresenceOfMind);
bool assizeReady = LevelChecked(Assize) && IsOffCooldown(Assize);
bool pomEnabled = IsEnabled(CustomComboPreset.WHM_ST_MainCombo_PresenceOfMind);
Expand Down Expand Up @@ -282,6 +286,12 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim
return OriginalHook(Aero);
}

// Glare IV
if (IsEnabled(CustomComboPreset.WHM_ST_MainCombo_GlareIV)
&& HasEffect(Buffs.SacredSight)
&& GetBuffStacks(Buffs.SacredSight) > 0)
return OriginalHook(PresenceOfMind);

if (IsEnabled(CustomComboPreset.WHM_ST_MainCombo_LilyOvercap) && LevelChecked(AfflatusRapture) &&
(liliesFull || liliesNearlyFull))
return AfflatusRapture;
Expand All @@ -303,22 +313,26 @@ internal class WHM_AoEHeals : CustomCombo

protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level)
{
if (actionID is Medica)
if (actionID is Medica1)
{
WHMGauge? gauge = GetJobGauge<WHMGauge>();
bool thinAirReady = LevelChecked(ThinAir) && !HasEffect(Buffs.ThinAir) && GetRemainingCharges(ThinAir) > Config.WHM_AoEHeals_ThinAir;
var canWeave = CanSpellWeave(actionID, 0.3);
bool lucidReady = ActionReady(All.LucidDreaming) && LocalPlayer.CurrentMp <= Config.WHM_AoEHeals_Lucid;
bool plenaryReady = ActionReady(PlenaryIndulgence) && (!Config.WHM_AoEHeals_PlenaryWeave || (Config.WHM_AoEHeals_PlenaryWeave && canWeave));
bool divineCaressReady = ActionReady(DivineCaress) && HasEffect(Buffs.DivineGrace);
bool assizeReady = ActionReady(Assize) && (!Config.WHM_AoEHeals_AssizeWeave || (Config.WHM_AoEHeals_AssizeWeave && canWeave));
var healTarget = GetHealTarget(Config.WHM_AoEHeals_Medica2MO);
var healTarget = GetHealTarget(Config.WHM_AoEHeals_MedicaMO);

if (IsEnabled(CustomComboPreset.WHM_AoEHeals_Assize) && assizeReady)
return Assize;

if (IsEnabled(CustomComboPreset.WHM_AoEHeals_Plenary) && plenaryReady)
return PlenaryIndulgence;

if (IsEnabled(CustomComboPreset.WHM_AoEHeals_DivineCaress) && divineCaressReady)
return DivineCaress;

if (IsEnabled(CustomComboPreset.WHM_AoEHeals_Lucid) && canWeave && lucidReady)
return All.LucidDreaming;

Expand All @@ -331,8 +345,19 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim
if (IsEnabled(CustomComboPreset.WHM_AoEHeals_ThinAir) && thinAirReady)
return ThinAir;

if (IsEnabled(CustomComboPreset.WHM_AoEHeals_Medica2) && (FindEffectOnMember(Buffs.Medica2, healTarget) == null || FindEffectOnMember(Buffs.Medica2, healTarget).RemainingTime <= Config.WHM_AoEHeals_Medica2Time) && ActionReady(Medica2))
if (IsEnabled(CustomComboPreset.WHM_AoEHeals_Medica2)
&& ((FindEffectOnMember(Buffs.Medica2, healTarget) == null && FindEffectOnMember(Buffs.Medica3, healTarget) == null)
|| FindEffectOnMember(Buffs.Medica2, healTarget).RemainingTime <= Config.WHM_AoEHeals_MedicaTime
|| FindEffectOnMember(Buffs.Medica3, healTarget).RemainingTime <= Config.WHM_AoEHeals_MedicaTime)
&& (ActionReady(Medica2) || ActionReady(Medica3)))
{
// Medica 3 upgrade
if (IsEnabled(CustomComboPreset.WHM_AoEHeals_Medica3)
&& LevelChecked(Medica3))
return Medica3;

return Medica2;
}

if (IsEnabled(CustomComboPreset.WHM_AoEHeals_Cure3) && ActionReady(Cure3) && (LocalPlayer.CurrentMp >= Config.WHM_AoEHeals_Cure3MP || HasEffect(Buffs.ThinAir)))
return Cure3;
Expand Down Expand Up @@ -437,6 +462,12 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim
return All.LucidDreaming;
}

// Glare IV
if (IsEnabled(CustomComboPreset.WHM_AoE_DPS_GlareIV)
&& HasEffect(Buffs.SacredSight)
&& GetBuffStacks(Buffs.SacredSight) > 0)
return OriginalHook(PresenceOfMind);

if (IsEnabled(CustomComboPreset.WHM_AoE_DPS_LilyOvercap) && LevelChecked(AfflatusRapture) &&
(liliesFullNoBlood || liliesNearlyFull))
return AfflatusRapture;
Expand Down
6 changes: 3 additions & 3 deletions XIVSlothCombo/Window/Functions/UserConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2596,8 +2596,8 @@ internal static void Draw(CustomComboPreset preset, bool enabled)

if (preset == CustomComboPreset.WHM_AoEHeals_Medica2)
{
UserConfig.DrawRoundedSliderFloat(0f, 6f, WHM.Config.WHM_AoEHeals_Medica2Time, "Time Remaining on Buff to Renew");
UserConfig.DrawAdditionalBoolChoice(WHM.Config.WHM_AoEHeals_Medica2MO, "Party UI Mousover Checking", "Check your mouseover target for the Medica II buff.\nTo be used in conjunction with Redirect/Reaction/etc.");
UserConfig.DrawRoundedSliderFloat(0f, 6f, WHM.Config.WHM_AoEHeals_MedicaTime, "Time Remaining on Buff to Renew");
UserConfig.DrawAdditionalBoolChoice(WHM.Config.WHM_AoEHeals_MedicaMO, "Party UI Mousover Checking", "Check your mouseover target for the Medica II/III buff.\nTo be used in conjunction with Redirect/Reaction/etc.");
}

#endregion
Expand Down Expand Up @@ -2698,4 +2698,4 @@ public const uint
Hundreds = 100,
Thousands = 1000;
}
}
}
2 changes: 1 addition & 1 deletion XIVSlothCombo/XIVSlothCombo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public sealed partial class XIVSlothCombo : IDalamudPlugin
//SMN.JobID,
//VPR.JobID,
WAR.JobID,
WHM.JobID
//WHM.JobID
};

public static readonly List<uint> DisabledJobsPVP = new List<uint>()
Expand Down

0 comments on commit c6f3405

Please sign in to comment.