Skip to content

Commit

Permalink
Add DOT refresh feature to White Mage combos (#100)
Browse files Browse the repository at this point in the history
New WHM feature by arty-maus to refresh WHM DOT debuff on current target when below configurable threshold.
  • Loading branch information
arty-maus authored Jun 19, 2024
1 parent 497415e commit 6b32c6b
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
17 changes: 16 additions & 1 deletion XIVComboVX/Combos/WHM.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Dalamud.Game.ClientState.JobGauge.Types;
using Dalamud.Game.Text;

namespace PrincessRTFM.XIVComboVX.Combos;

Expand Down Expand Up @@ -39,7 +40,10 @@ public static class Buffs {
}

public static class Debuffs {
// public const ushort placeholder = 0;
public const ushort
Aero = 143,
Aero2 = 144,
Dia = 1871;
}

public static class Levels {
Expand Down Expand Up @@ -76,6 +80,17 @@ 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,
WHM.Aero2 => WHM.Debuffs.Aero2,
WHM.Dia => WHM.Debuffs.Dia,
};

if (HasTarget && TargetOwnEffectDuration(effectIdToTrack) < Service.Configuration.WhiteMageDotRefreshDuration)
return OriginalHook(WHM.Aero);
}

return actionID;
}
Expand Down
9 changes: 9 additions & 0 deletions XIVComboVX/Config/PluginConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,15 @@ public PluginConfiguration() { }

[LucidWeavingSetting(CustomComboPreset.WhiteMageLucidWeave)]
public uint WhiteMageLucidWeaveManaThreshold { get; set; } = 7000;

[ComboDetailSetting(
CustomComboPreset.WhiteMageDotRefresh,
"Debuff time threshold",
"When your current target's Aero/Aero2/Dia debuff only has this many seconds left, switch back to DOT",
0,
30
)]
public float WhiteMageDotRefreshDuration { get; set; } = 3F;

#endregion

Expand Down
3 changes: 3 additions & 0 deletions XIVComboVX/CustomComboPreset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1494,6 +1494,9 @@ public enum CustomComboPreset {

[CustomComboInfo("Cure 2 Level Sync", "Changes Cure 2 to Cure when below level 30 in synced content.", WHM.JobID)]
WhiteMageCureFeature = 2403,

[CustomComboInfo("DOT Refresh", "Replace Stone/Glare with level appropriate DOT when debuff is about to fall off.", WHM.JobID)]
WhiteMageDotRefresh = 2407,

#endregion
// ====================================================================================
Expand Down

0 comments on commit 6b32c6b

Please sign in to comment.