Skip to content

Commit

Permalink
Merge pull request #50 from Kagekazu/PCT_MissingOption
Browse files Browse the repository at this point in the history
[PCT] add swiftcast motifs option
  • Loading branch information
Taurenkey authored Nov 19, 2024
2 parents 8cddbb0 + 19b5ad0 commit ece537d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
6 changes: 5 additions & 1 deletion XIVSlothCombo/Combos/CustomComboPreset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2740,6 +2740,10 @@ public enum CustomComboPreset
[CustomComboInfo("Swiftcast Option ", $"Adds Swiftcast to the combo while moving.", PCT.JobID)]
PCT_ST_AdvancedMode_SwitfcastOption = 20032,

[ParentCombo(PCT_ST_AdvancedMode)]
[CustomComboInfo("Swiftcast Motifs Option ", $"Use swiftcast for motifs.", PCT.JobID)]
PCT_ST_AdvancedMode_SwiftMotifs = 20035,

[ParentCombo(PCT_ST_AdvancedMode)]
[CustomComboInfo("Blizzard in Cyan Option", $"Adds Blizzard in Cyan to the combo.", PCT.JobID)]
PCT_ST_AdvancedMode_BlizzardInCyan = 20033,
Expand All @@ -2748,7 +2752,7 @@ public enum CustomComboPreset
[CustomComboInfo("Lucid Dreaming Option", $"Adds Lucid Dreaming to the combo.", PCT.JobID)]
PCT_ST_AdvancedMode_LucidDreaming = 20034,

// Last value for ST = 20034
// Last value for ST = 20035
#endregion

#region AoE
Expand Down
24 changes: 12 additions & 12 deletions XIVSlothCombo/Combos/PvE/PCT/PCT.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb
{
if (actionID is FireInRed)
{
var gauge = GetJobGauge<PCTGauge>();
PCTGauge gauge = GetJobGauge<PCTGauge>();
bool canWeave = CanSpellWeave(ActionWatching.LastSpell) || CanSpellWeave(actionID);

// Variant Cure
Expand Down Expand Up @@ -348,13 +348,12 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb
{
if (actionID is FireInRed)
{
var gauge = GetJobGauge<PCTGauge>();
PCTGauge gauge = GetJobGauge<PCTGauge>();
bool canWeave = CanSpellWeave(ActionWatching.LastSpell) || CanSpellWeave(actionID);
int creatureStop = PluginConfiguration.GetCustomIntValue(Config.PCT_ST_CreatureStop);
int landscapeStop = PluginConfiguration.GetCustomIntValue(Config.PCT_ST_LandscapeStop);
int weaponStop = PluginConfiguration.GetCustomIntValue(Config.PCT_ST_WeaponStop);


// Variant Cure
if (IsEnabled(CustomComboPreset.PCT_Variant_Cure) &&
IsEnabled(Variant.VariantCure) &&
Expand Down Expand Up @@ -494,7 +493,8 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb
}

// Swiftcast Motifs
if (HasEffect(All.Buffs.Swiftcast))
if (IsEnabled(CustomComboPreset.PCT_ST_AdvancedMode_SwiftMotifs) &&
HasEffect(All.Buffs.Swiftcast))
{
if (!gauge.CreatureMotifDrawn && CreatureMotif.LevelChecked() && !HasEffect(Buffs.StarryMuse) && GetTargetHPPercent() > creatureStop)
return OriginalHook(CreatureMotif);
Expand Down Expand Up @@ -653,14 +653,14 @@ protected override uint Invoke(uint actionID, uint lastComboActionID, float comb


if (!InCombat() || InCombat() && CurrentTarget == null)
{
if (CreatureMotif.LevelChecked() && !gauge.CreatureMotifDrawn)
return OriginalHook(CreatureMotif);
if (WeaponMotif.LevelChecked() && !gauge.WeaponMotifDrawn && !HasEffect(Buffs.HammerTime))
return OriginalHook(WeaponMotif);
if (LandscapeMotif.LevelChecked() && !gauge.LandscapeMotifDrawn && !HasEffect(Buffs.StarryMuse))
return OriginalHook(LandscapeMotif);
}
{
if (CreatureMotif.LevelChecked() && !gauge.CreatureMotifDrawn)
return OriginalHook(CreatureMotif);
if (WeaponMotif.LevelChecked() && !gauge.WeaponMotifDrawn && !HasEffect(Buffs.HammerTime))
return OriginalHook(WeaponMotif);
if (LandscapeMotif.LevelChecked() && !gauge.LandscapeMotifDrawn && !HasEffect(Buffs.StarryMuse))
return OriginalHook(LandscapeMotif);
}


// General Weaves
Expand Down

0 comments on commit ece537d

Please sign in to comment.