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

Commit

Permalink
Fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Taurenkey committed Jul 31, 2024
2 parents 41f7996 + 15b2591 commit d5af0ea
Show file tree
Hide file tree
Showing 59 changed files with 353 additions and 477 deletions.
5 changes: 2 additions & 3 deletions XIVSlothCombo/Attributes/CustomComboInfoAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
using System.Linq;
using System.Runtime.CompilerServices;
using XIVSlothCombo.Combos.PvE;
using XIVSlothCombo.Services;

namespace XIVSlothCombo.Attributes
{
Expand Down Expand Up @@ -93,7 +92,7 @@ private static string JobIDToShorthand(byte key)
}
}

private static readonly Dictionary<uint, ClassJob> ClassJobs = Service.DataManager.GetExcelSheet<ClassJob>()!.ToDictionary(i => i.RowId, i => i);
private static readonly Dictionary<uint, ClassJob> ClassJobs = Svc.Data.GetExcelSheet<ClassJob>()!.ToDictionary(i => i.RowId, i => i);

public static string JobIDToName(byte key)
{
Expand All @@ -108,7 +107,7 @@ public static string JobIDToName(byte key)
//Grab Category name for DOH/DOL, else the normal Name for the rest
string jobname = key is 08 or 16 ? job.ClassJobCategory.Value.Name : job.Name;
//Job names are all lowercase by default. This capitalizes based on regional rules
string cultureID = Service.ClientState.ClientLanguage switch
string cultureID = Svc.ClientState.ClientLanguage switch
{
Dalamud.Game.ClientLanguage.French => "fr-FR",
Dalamud.Game.ClientLanguage.Japanese => "ja-JP",
Expand Down
2 changes: 1 addition & 1 deletion XIVSlothCombo/Combos/CustomComboPreset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3850,7 +3850,7 @@ The three digets after RDM.JobID can be used to reorder items in the list

[ReplaceSkill(WAR.StormsPath)]
[CustomComboInfo("Advanced Mode - Single Target", "Replaces Storm's Path with a one-button full single target rotation.\nThese features are ideal if you want to customize the rotation.", WAR.JobID, 1)]
WAR_ST_StormsPath = 18000,
WAR_ST_StormsPath = 18000,

[ParentCombo(WAR_ST_StormsPath)]
[CustomComboInfo("Berserk / Inner Release Option", "Adds Berserk / Inner Release to Advanced Mode.", WAR.JobID)]
Expand Down
10 changes: 4 additions & 6 deletions XIVSlothCombo/Combos/JobHelpers/AST.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@
using Dalamud.Game.ClientState.Objects.Types;
using Dalamud.Plugin.Services;
using ECommons.DalamudServices;
using System;
using System.Collections.Generic;
using System.Linq;
using XIVSlothCombo.CustomComboNS.Functions;
using XIVSlothCombo.Extensions;
using XIVSlothCombo.Services;
using static XIVSlothCombo.Combos.PvE.AST;

namespace XIVSlothCombo.Combos.JobHelpers
Expand All @@ -16,12 +14,12 @@ internal static class AST
{
internal static void Init()
{
Service.Framework.Update += CheckCards;
Svc.Framework.Update += CheckCards;
}

private static void CheckCards(IFramework framework)
{
if (Service.ClientState.LocalPlayer is null || Service.ClientState.LocalPlayer.ClassJob.Id != 33)
if (Svc.ClientState.LocalPlayer is null || Svc.ClientState.LocalPlayer.ClassJob.Id != 33)
return;

if (Svc.Condition[Dalamud.Game.ClientState.Conditions.ConditionFlag.BetweenAreas] || Svc.Condition[Dalamud.Game.ClientState.Conditions.ConditionFlag.Unconscious])
Expand All @@ -35,7 +33,7 @@ private static void CheckCards(IFramework framework)
DrawnCard = Gauge.DrawnCards[0];
}

if (CustomComboFunctions.IsEnabled(CustomComboPreset.AST_Cards_QuickTargetCards) &&
if (CustomComboFunctions.IsEnabled(CustomComboPreset.AST_Cards_QuickTargetCards) &&
(AST_QuickTargetCards.SelectedRandomMember is null || BetterTargetAvailable()))
{
if (CustomComboFunctions.ActionReady(Play1))
Expand Down Expand Up @@ -205,7 +203,7 @@ private static bool SetTarget()

internal static void Dispose()
{
Service.Framework.Update -= CheckCards;
Svc.Framework.Update -= CheckCards;
}
}
}
2 changes: 1 addition & 1 deletion XIVSlothCombo/Combos/JobHelpers/BLM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ public bool DoFullOpener(ref uint actionID, bool simpleMode)
ResetOpener();
CurrentState = OpenerState.PrePull;
}


return false;
}
Expand Down
6 changes: 3 additions & 3 deletions XIVSlothCombo/Combos/JobHelpers/NIN.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using Dalamud.Game.ClientState.Conditions;
using Dalamud.Game.ClientState.JobGauge.Types;
using ECommons.DalamudServices;
using XIVSlothCombo.Combos.JobHelpers.Enums;
using XIVSlothCombo.CustomComboNS.Functions;
using XIVSlothCombo.Data;
using XIVSlothCombo.Extensions;
using XIVSlothCombo.Services;

namespace XIVSlothCombo.Combos.JobHelpers
{
Expand Down Expand Up @@ -593,7 +593,7 @@ public bool DoFullOpener(ref uint actionID, MudraCasting mudraState)
{
if (!LevelChecked) return false;

if (!openerEventsSetup) { Service.Condition.ConditionChange += CheckCombatStatus; openerEventsSetup = true; }
if (!openerEventsSetup) { Svc.Condition.ConditionChange += CheckCombatStatus; openerEventsSetup = true; }

if (CurrentState == OpenerState.PrePull || CurrentState == OpenerState.FailedOpener)
if (DoPrePullSteps(ref actionID, mudraState)) return true;
Expand All @@ -609,7 +609,7 @@ public bool DoFullOpener(ref uint actionID, MudraCasting mudraState)

internal void Dispose()
{
Service.Condition.ConditionChange -= CheckCombatStatus;
Svc.Condition.ConditionChange -= CheckCombatStatus;
}

private void CheckCombatStatus(ConditionFlag flag, bool value)
Expand Down
6 changes: 3 additions & 3 deletions XIVSlothCombo/Combos/JobHelpers/RDM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public static (bool useFire, bool useStone, bool useThunder, bool useAero, bool
}

internal class MeleeFinisher : PvE.RDM
{
{
internal static bool CanUse(in uint lastComboMove, out uint actionID)
{
int blackmana = RDMMana.Black;
Expand Down Expand Up @@ -170,7 +170,7 @@ internal class OGCDHelper : PvE.RDM
internal static bool CanUse(in uint actionID, in bool SingleTarget, out uint newActionID)
{
var distance = CustomComboFunctions.GetTargetDistance();

uint placeOGCD = 0;

bool fleche = SingleTarget ? Config.RDM_ST_oGCD_Fleche : Config.RDM_AoE_oGCD_Fleche;
Expand Down Expand Up @@ -199,7 +199,7 @@ internal static bool CanUse(in uint actionID, in bool SingleTarget, out uint new
&& LevelChecked(Corpsacorps)
&& distance <= corpacorpsRange)
placeOGCD = Corpsacorps;

if (contra
&& ActionReady(ContreSixte))
placeOGCD = ContreSixte;
Expand Down
2 changes: 1 addition & 1 deletion XIVSlothCombo/Combos/JobHelpers/SGE.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ internal class SGE : CustomComboFunctions
public static int GetMatchingConfigST(int i, out uint action, out bool enabled)
{
var healTarget = GetHealTarget(PvE.SGE.Config.SGE_ST_Heal_Adv && PvE.SGE.Config.SGE_ST_Heal_UIMouseOver);

switch (i)
{
case 0:
Expand Down
12 changes: 6 additions & 6 deletions XIVSlothCombo/Combos/PvE/ALL.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using XIVSlothCombo.CustomComboNS;
using ECommons.DalamudServices;
using XIVSlothCombo.CustomComboNS;
using XIVSlothCombo.CustomComboNS.Functions;
using XIVSlothCombo.Services;

namespace XIVSlothCombo.Combos.PvE
{
Expand Down Expand Up @@ -84,7 +84,7 @@ internal class ALL_IslandSanctuary_Sprint : CustomCombo

protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level)
{
if (actionID is Sprint && Service.ClientState.TerritoryType is 1055) return IsleSprint;
if (actionID is Sprint && Svc.ClientState.TerritoryType is 1055) return IsleSprint;
else return actionID;
}
}
Expand Down Expand Up @@ -133,7 +133,7 @@ internal class ALL_Healer_Raise : CustomCombo

protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level)
{
if ((actionID is WHM.Raise or AST.Ascend or SGE.Egeiro)
if ((actionID is WHM.Raise or AST.Ascend or SGE.Egeiro)
|| (actionID is SCH.Resurrection && LocalPlayer.ClassJob.Id is SCH.JobID))
{
if (ActionReady(Swiftcast))
Expand Down Expand Up @@ -172,7 +172,7 @@ internal class ALL_Caster_Raise : CustomCombo

protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level)
{
if ((actionID is BLU.AngelWhisper or RDM.Verraise)
if ((actionID is BLU.AngelWhisper or RDM.Verraise)
|| (actionID is SMN.Resurrection && LocalPlayer.ClassJob.Id is SMN.JobID))
{
if (HasEffect(Buffs.Swiftcast) || HasEffect(RDM.Buffs.Dualcast))
Expand Down Expand Up @@ -241,7 +241,7 @@ internal class ALL_Ranged_Interrupt : CustomCombo

protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level)
{
return (actionID is FootGraze && CanInterruptEnemy() && ActionReady(HeadGraze) ) ? HeadGraze : actionID;
return (actionID is FootGraze && CanInterruptEnemy() && ActionReady(HeadGraze)) ? HeadGraze : actionID;
}
}
}
Expand Down
24 changes: 10 additions & 14 deletions XIVSlothCombo/Combos/PvE/AST.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using Dalamud.Game.ClientState.JobGauge.Types;
using Dalamud.Game.ClientState.Objects.Types;
using Dalamud.Game.ClientState.Statuses;
using ECommons.DalamudServices;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using XIVSlothCombo.Combos.PvE.Content;
Expand Down Expand Up @@ -216,7 +216,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim
!HasEffect(Buffs.Lightspeed))
return Lightspeed;



if (IsEnabled(CustomComboPreset.AST_DPS_Lucid) &&
ActionReady(All.LucidDreaming) &&
Expand Down Expand Up @@ -252,7 +252,7 @@ Gauge.DrawnCards[0] is not CardType.NONE &&
if (IsEnabled(CustomComboPreset.AST_DPS_Oracle) &&
HasEffect(Buffs.Divining) &&
CanSpellWeave(actionID))
return Oracle;
return Oracle;

//Minor Arcana / Lord of Crowns
if (ActionReady(OriginalHook(MinorArcana)) &&
Expand All @@ -266,23 +266,19 @@ Gauge.DrawnCards[0] is not CardType.NONE &&
//Combust
if (IsEnabled(CustomComboPreset.AST_ST_DPS_CombustUptime) &&
!GravityList.Contains(actionID) &&
LevelChecked(Combust))
LevelChecked(Combust) &&
CombustList.TryGetValue(OriginalHook(Combust), out ushort dotDebuffID))
{
//Grab current DoT via OriginalHook, grab it's fellow debuff ID from Dictionary, then check for the debuff
uint dot = OriginalHook(Combust);
Status? dotDebuff = FindTargetEffect(CombustList[dot]);
float refreshtimer = Config.AST_ST_DPS_CombustUptime_Adv ? Config.AST_ST_DPS_CombustUptime_Threshold : 3;

if (IsEnabled(CustomComboPreset.AST_Variant_SpiritDart) &&
IsEnabled(Variant.VariantSpiritDart) &&
(sustainedDamage is null || sustainedDamage?.RemainingTime <= 3) &&
GetDebuffRemainingTime(Variant.Debuffs.SustainedDamage) <= 3 &&
CanSpellWeave(actionID))
return Variant.VariantSpiritDart;


if ((dotDebuff is null || dotDebuff.RemainingTime <= refreshtimer) &&
float refreshtimer = Config.AST_ST_DPS_CombustUptime_Adv ? Config.AST_ST_DPS_CombustUptime_Threshold : 3;
if (GetDebuffRemainingTime(dotDebuffID) <= refreshtimer &&
GetTargetHPPercent() > Config.AST_DPS_CombustOption)
return dot;
return OriginalHook(Combust);

//AlterateMode idles as Malefic
if (AlternateMode) return OriginalHook(Malefic);
Expand Down
10 changes: 5 additions & 5 deletions XIVSlothCombo/Combos/PvE/BLM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim
if (gauge.ElementTimeRemaining <= astralFireRefresh && !HasEffect(Buffs.Firestarter) && currentMP >= MP.FireI)
return OriginalHook(Fire);

if (IsEnabled(CustomComboPreset.BLM_Adv_Cooldowns) &&
if (IsEnabled(CustomComboPreset.BLM_Adv_Cooldowns) &&
Config.BLM_Adv_Cooldowns_Choice[0] &&
ActionReady(Manafont) && WasLastAction(Despair))
return Manafont;
Expand Down Expand Up @@ -718,7 +718,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim
// Blizzard to Umbral Ice
if ((currentMP is 0 && WasLastAction(Flare)) ||
(currentMP < MP.FireAoE && !LevelChecked(Flare)))
return OriginalHook(Blizzard2);
return OriginalHook(Blizzard2);

if (currentMP >= MP.AllMPSpells)
{
Expand Down Expand Up @@ -768,7 +768,7 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim

if (currentMP < 9400 && !TraitLevelChecked(Traits.EnhancedFreeze) && Freeze.LevelChecked() && currentMP >= MP.Freeze)
return Freeze;

if (currentMP >= 9400 && !TraitLevelChecked(Traits.AspectMasteryIII))
return Transpose;

Expand Down Expand Up @@ -889,8 +889,8 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim
ActionReady(Triplecast) && !HasEffect(Buffs.Triplecast))
return Triplecast;

if (LevelChecked(Flare) && HasEffect(Buffs.EnhancedFlare) && TraitLevelChecked(Traits.Enochian) &&
(gauge.UmbralHearts is 1 || currentMP < MP.FireAoE))
if (LevelChecked(Flare) && HasEffect(Buffs.EnhancedFlare) && TraitLevelChecked(Traits.Enochian) &&
(gauge.UmbralHearts is 1 || currentMP < MP.FireAoE))
return Flare;

if (currentMP > MP.FireAoE)
Expand Down
2 changes: 0 additions & 2 deletions XIVSlothCombo/Combos/PvE/BRD.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
using Dalamud.Game.ClientState.JobGauge.Enums;
using Dalamud.Game.ClientState.JobGauge.Types;
using Dalamud.Game.ClientState.Statuses;
using ECommons.DalamudServices;
using System;
using XIVSlothCombo.Combos.PvE.Content;
using XIVSlothCombo.Core;
using XIVSlothCombo.CustomComboNS;
using static FFXIVClientStructs.FFXIV.Client.UI.AddonJobHudBRD0;

namespace XIVSlothCombo.Combos.PvE
{
Expand Down
8 changes: 4 additions & 4 deletions XIVSlothCombo/Combos/PvE/Content/Variant.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using XIVSlothCombo.Services;
using ECommons.DalamudServices;

namespace XIVSlothCombo.Combos.PvE.Content
{
Expand All @@ -11,21 +11,21 @@ public const uint
//1069 = The Sil'dihn Subterrane
//1137 = Mount Rokkon
//1176 = Aloalo Island
public static uint VariantCure => Service.ClientState.TerritoryType switch
public static uint VariantCure => Svc.ClientState.TerritoryType switch
{
1069 => 29729,
1137 or 1176 => 33862,
_ => 0
};

public static uint VariantSpiritDart => Service.ClientState.TerritoryType switch
public static uint VariantSpiritDart => Svc.ClientState.TerritoryType switch
{
1069 => 29732,
1137 or 1176 => 33863,
_ => 0
};

public static uint VariantRampart => Service.ClientState.TerritoryType switch
public static uint VariantRampart => Svc.ClientState.TerritoryType switch
{
1069 => 29733,
1137 or 1176 => 33864,
Expand Down
8 changes: 4 additions & 4 deletions XIVSlothCombo/Combos/PvE/DOL.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ internal const uint
Triangulate = 210,
ArborCall = 211,
ArborCall2 = 290,
TruthOfForests = 221,
TruthOfForests = 221,
//FSH
Cast = 289,
Hook = 296,
Expand Down Expand Up @@ -89,17 +89,17 @@ protected override uint Invoke(uint actionID, uint lastComboMove, float comboTim
internal class FSH_CastHook : CustomCombo
{
protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.FSH_CastHook;
protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level)
protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level)
=> actionID is Cast && HasCondition(ConditionFlag.Fishing) ? Hook : actionID;
}

internal class FSH_Swim : CustomCombo
{
protected internal override CustomComboPreset Preset { get; } = CustomComboPreset.FSH_Swim;
protected override uint Invoke(uint actionID, uint lastComboMove, float comboTime, byte level)
{
if (HasCondition(ConditionFlag.Diving))
{
{
if (actionID is Cast && IsEnabled(CustomComboPreset.FSH_CastGig)) return Gig;
if (actionID is SurfaceSlap && IsEnabled(CustomComboPreset.FSH_SurfaceTrade)) return VeteranTrade;
if (actionID is PrizeCatch && IsEnabled(CustomComboPreset.FSH_PrizeBounty)) return NaturesBounty;
Expand Down
1 change: 0 additions & 1 deletion XIVSlothCombo/Combos/PvE/DRG.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System;
using Dalamud.Game.ClientState.JobGauge.Types;
using Dalamud.Game.ClientState.Statuses;
using XIVSlothCombo.Combos.JobHelpers;
Expand Down
Loading

0 comments on commit d5af0ea

Please sign in to comment.