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

Commit

Permalink
Merge pull request #1 from zbee/ast-fix
Browse files Browse the repository at this point in the history
Fix checking for other AST's Helios, and clean up my code
  • Loading branch information
edewen authored Aug 22, 2024
2 parents 76d7786 + 9897a4b commit 5019fb7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 19 deletions.
3 changes: 2 additions & 1 deletion XIVSlothCombo/Combos/CustomComboPreset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,8 @@ public enum CustomComboPreset
AST_AoE_SimpleHeals_Horoscope = 1026,

[ParentCombo(AST_AoE_SimpleHeals_AspectedHelios)]
[CustomComboInfo("Aspected Helios Option", "In Helios mode: Will Cast Aspected Helios when the HoT is missing on yourself.", AST.JobID)]
[CustomComboInfo("Aspected Helios Option", "In Helios mode: Will Cast Aspected Helios when the HoT is missing on yourself."
+ "\nIn Aspected Helios mode: Is considered enabled regardless.", AST.JobID)]
AST_AoE_SimpleHeals_Aspected = 1053,

[ReplaceSkill(AST.Benefic2)]
Expand Down
27 changes: 9 additions & 18 deletions XIVSlothCombo/Combos/PvE/AST.cs
Original file line number Diff line number Diff line change
Expand Up @@ -483,8 +483,6 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim
bool NonaspectedMode = GetIntOptionAsBool(Config.AST_AoEHeals_AltMode); //(0 or 1 radio values)

if (NonaspectedMode && actionID is Helios || !NonaspectedMode && actionID is AspectedHelios or HeliosConjuction)


{
var canLady = (Config.AST_AoE_SimpleHeals_WeaveLady && CanSpellWeave(actionID)) || !Config.AST_AoE_SimpleHeals_WeaveLady;
var canHoroscope = (Config.AST_AoE_SimpleHeals_Horoscope && CanSpellWeave(actionID)) || !Config.AST_AoE_SimpleHeals_Horoscope;
Expand Down Expand Up @@ -515,30 +513,23 @@ Gauge.DrawnCrownCard is CardType.LADY
return OriginalHook(Horoscope);
}

if (IsEnabled(CustomComboPreset.AST_AoE_SimpleHeals_Aspected) && NonaspectedMode) // So helios mode can run aspected option
{
if ((ActionReady(AspectedHelios)
&& !HasEffect(Buffs.AspectedHelios)
&& !HasEffect(Buffs.HeliosConjunction))
|| HasEffect(Buffs.Horoscope)
|| (HasEffect(Buffs.NeutralSect) && !HasEffect(Buffs.NeutralSectShield)))
return OriginalHook(AspectedHelios);
}
// Only check for our own HoTs
var aspectedHeliosHoT = FindEffect(Buffs.AspectedBenefic, LocalPlayer, LocalPlayer?.GameObjectId);
var heliosConjunctionHoT = FindEffect(Buffs.AspectedBenefic, LocalPlayer, LocalPlayer?.GameObjectId);

if (!NonaspectedMode) //So aspected mode runs normal without having to select it from the option as well
if ((IsEnabled(CustomComboPreset.AST_AoE_SimpleHeals_Aspected) && NonaspectedMode) || // Helios mode: option must be on
!NonaspectedMode) // Aspected mode: option is not required
{
if ((ActionReady(AspectedHelios)
&& !HasEffect(Buffs.AspectedHelios)
&& !HasEffect(Buffs.HeliosConjunction))
&& aspectedHeliosHoT is null
&& heliosConjunctionHoT is null)
|| HasEffect(Buffs.Horoscope)
|| (HasEffect(Buffs.NeutralSect) && !HasEffect(Buffs.NeutralSectShield)))
return OriginalHook(AspectedHelios);
}

if ((HasEffect(Buffs.AspectedHelios)
|| HasEffect(Buffs.HeliosConjunction))
&& (FindEffect(Buffs.AspectedHelios)?.RemainingTime > 2
|| FindEffect(Buffs.HeliosConjunction)?.RemainingTime > 2))
if ((aspectedHeliosHoT is not null || heliosConjunctionHoT is not null)
&& (aspectedHeliosHoT?.RemainingTime > 2 || heliosConjunctionHoT?.RemainingTime > 2))
return Helios;
}

Expand Down

0 comments on commit 5019fb7

Please sign in to comment.