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

Commit

Permalink
fix: change jobgauge.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed May 18, 2023
1 parent 55e168d commit 0cdb7ae
Show file tree
Hide file tree
Showing 20 changed files with 61 additions and 26 deletions.
4 changes: 3 additions & 1 deletion RotationSolver.Basic/Rotations/Basic/AST_Base.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
using ECommons.DalamudServices;

namespace RotationSolver.Basic.Rotations.Basic;

public abstract class AST_Base : CustomRotation
Expand All @@ -6,7 +8,7 @@ public abstract class AST_Base : CustomRotation

public sealed override ClassJobID[] JobIDs => new ClassJobID[] { ClassJobID.Astrologian };

static ASTGauge JobGauge => Service.JobGauges.Get<ASTGauge>();
static ASTGauge JobGauge => Svc.Gauges.Get<ASTGauge>();

protected static CardType DrawnCard => JobGauge.DrawnCard;

Expand Down
6 changes: 4 additions & 2 deletions RotationSolver.Basic/Rotations/Basic/BLM_Base.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
namespace RotationSolver.Basic.Rotations.Basic;
using ECommons.DalamudServices;

namespace RotationSolver.Basic.Rotations.Basic;

public abstract partial class BLM_Base : CustomRotation
{
Expand All @@ -7,7 +9,7 @@ public abstract partial class BLM_Base : CustomRotation
public sealed override ClassJobID[] JobIDs => new ClassJobID[] { ClassJobID.BlackMage, ClassJobID.Thaumaturge };

#region Job Gauge
static BLMGauge JobGauge => Service.JobGauges.Get<BLMGauge>();
static BLMGauge JobGauge => Svc.Gauges.Get<BLMGauge>();

protected static byte UmbralIceStacks => JobGauge.UmbralIceStacks;

Expand Down
4 changes: 3 additions & 1 deletion RotationSolver.Basic/Rotations/Basic/BRD_Base.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
using ECommons.DalamudServices;

namespace RotationSolver.Basic.Rotations.Basic;

public abstract class BRD_Base : CustomRotation
Expand All @@ -7,7 +9,7 @@ public abstract class BRD_Base : CustomRotation
public sealed override ClassJobID[] JobIDs => new[] { ClassJobID.Bard, ClassJobID.Archer };

#region Job Gauge
static BRDGauge JobGauge => Service.JobGauges.Get<BRDGauge>();
static BRDGauge JobGauge => Svc.Gauges.Get<BRDGauge>();

protected static byte Repertoire => JobGauge.Repertoire;

Expand Down
4 changes: 3 additions & 1 deletion RotationSolver.Basic/Rotations/Basic/DNC_Base.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
using ECommons.DalamudServices;

namespace RotationSolver.Basic.Rotations.Basic;
public abstract class DNC_Base : CustomRotation
{
public override MedicineType MedicineType => MedicineType.Dexterity;
public sealed override ClassJobID[] JobIDs => new ClassJobID[] { ClassJobID.Dancer };

#region Job Gauge
static DNCGauge JobGauge => Service.JobGauges.Get<DNCGauge>();
static DNCGauge JobGauge => Svc.Gauges.Get<DNCGauge>();

protected static bool IsDancing => JobGauge.IsDancing;

Expand Down
4 changes: 3 additions & 1 deletion RotationSolver.Basic/Rotations/Basic/DRG_Base.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
using ECommons.DalamudServices;

namespace RotationSolver.Basic.Rotations.Basic;

public abstract class DRG_Base : CustomRotation
Expand All @@ -8,7 +10,7 @@ public abstract class DRG_Base : CustomRotation


#region Job Gauge
static DRGGauge JobGauge => Service.JobGauges.Get<DRGGauge>();
static DRGGauge JobGauge => Svc.Gauges.Get<DRGGauge>();

protected static byte EyeCount => JobGauge.EyeCount;

Expand Down
6 changes: 4 additions & 2 deletions RotationSolver.Basic/Rotations/Basic/DRK_Base.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
namespace RotationSolver.Basic.Rotations.Basic;
using ECommons.DalamudServices;

namespace RotationSolver.Basic.Rotations.Basic;
public abstract class DRK_Base : CustomRotation
{

Expand All @@ -7,7 +9,7 @@ public abstract class DRK_Base : CustomRotation
public sealed override ClassJobID[] JobIDs => new ClassJobID[] { ClassJobID.DarkKnight };

#region Job Gauge
private static DRKGauge JobGauge => Service.JobGauges.Get<DRKGauge>();
private static DRKGauge JobGauge => Svc.Gauges.Get<DRKGauge>();

protected static byte Blood => JobGauge.Blood;

Expand Down
4 changes: 3 additions & 1 deletion RotationSolver.Basic/Rotations/Basic/GNB_Base.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
using ECommons.DalamudServices;

namespace RotationSolver.Basic.Rotations.Basic;

public abstract class GNB_Base : CustomRotation
Expand All @@ -8,7 +10,7 @@ public abstract class GNB_Base : CustomRotation
protected override bool CanHealAreaSpell => false;

#region Job Gauge
static GNBGauge JobGauge => Service.JobGauges.Get<GNBGauge>();
static GNBGauge JobGauge => Svc.Gauges.Get<GNBGauge>();

protected static byte Ammo => JobGauge.Ammo;
protected static byte AmmoComboStep => JobGauge.AmmoComboStep;
Expand Down
4 changes: 3 additions & 1 deletion RotationSolver.Basic/Rotations/Basic/MCH_Base.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
using ECommons.DalamudServices;

namespace RotationSolver.Basic.Rotations.Basic;

public abstract class MCH_Base : CustomRotation
Expand All @@ -7,7 +9,7 @@ public abstract class MCH_Base : CustomRotation
public sealed override ClassJobID[] JobIDs => new ClassJobID[] { ClassJobID.Machinist };

#region Job Gauge
static MCHGauge JobGauge => Service.JobGauges.Get<MCHGauge>();
static MCHGauge JobGauge => Svc.Gauges.Get<MCHGauge>();

protected static bool IsOverheated => JobGauge.IsOverheated;

Expand Down
4 changes: 3 additions & 1 deletion RotationSolver.Basic/Rotations/Basic/MNK_Base.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
using ECommons.DalamudServices;

namespace RotationSolver.Basic.Rotations.Basic;

public abstract class MNK_Base : CustomRotation
Expand All @@ -7,7 +9,7 @@ public abstract class MNK_Base : CustomRotation
public sealed override ClassJobID[] JobIDs => new ClassJobID[] { ClassJobID.Monk, ClassJobID.Pugilist };

#region Job Gauge
static MNKGauge JobGauge => Service.JobGauges.Get<MNKGauge>();
static MNKGauge JobGauge => Svc.Gauges.Get<MNKGauge>();

protected static BeastChakra[] BeastChakras => JobGauge.BeastChakra;

Expand Down
4 changes: 3 additions & 1 deletion RotationSolver.Basic/Rotations/Basic/NIN_Base.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
using ECommons.DalamudServices;

namespace RotationSolver.Basic.Rotations.Basic;

public interface INinAction : IBaseAction
Expand All @@ -11,7 +13,7 @@ public abstract class NIN_Base : CustomRotation
public sealed override ClassJobID[] JobIDs => new ClassJobID[] { ClassJobID.Ninja, ClassJobID.Rogue };

#region Job Gauge
static NINGauge JobGauge => Service.JobGauges.Get<NINGauge>();
static NINGauge JobGauge => Svc.Gauges.Get<NINGauge>();

[Obsolete("Better not use this.")]
protected static bool InHuton => HutonTime > 0;
Expand Down
4 changes: 3 additions & 1 deletion RotationSolver.Basic/Rotations/Basic/PLD_Base.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
using ECommons.DalamudServices;

namespace RotationSolver.Basic.Rotations.Basic;

public abstract class PLD_Base : CustomRotation
Expand All @@ -15,7 +17,7 @@ public abstract class PLD_Base : CustomRotation
protected static bool HasFightOrFlight => !Player.WillStatusEndGCD(0, 0, true, StatusID.FightOrFlight);

#region Job Gauge
private static PLDGauge JobGauge => Service.JobGauges.Get<PLDGauge>();
private static PLDGauge JobGauge => Svc.Gauges.Get<PLDGauge>();

protected static byte OathGauge => JobGauge.OathGauge;
#endregion
Expand Down
4 changes: 3 additions & 1 deletion RotationSolver.Basic/Rotations/Basic/RDM_Base.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
using ECommons.DalamudServices;

namespace RotationSolver.Basic.Rotations.Basic;

public abstract class RDM_Base : CustomRotation
Expand All @@ -7,7 +9,7 @@ public abstract class RDM_Base : CustomRotation
protected override bool CanHealSingleSpell => DataCenter.PartyMembers.Count() == 1 && base.CanHealSingleSpell;

#region Job Gauge
static RDMGauge JobGauge => Service.JobGauges.Get<RDMGauge>();
static RDMGauge JobGauge => Svc.Gauges.Get<RDMGauge>();

protected static byte WhiteMana => JobGauge.WhiteMana;

Expand Down
6 changes: 4 additions & 2 deletions RotationSolver.Basic/Rotations/Basic/RPR_Base.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
namespace RotationSolver.Basic.Rotations.Basic;
using ECommons.DalamudServices;

namespace RotationSolver.Basic.Rotations.Basic;

public abstract class RPR_Base : CustomRotation
{
Expand All @@ -14,7 +16,7 @@ public abstract class RPR_Base : CustomRotation
protected static bool HasSoulReaver => Player.HasStatus(true, StatusID.SoulReaver);

#region JobGauge
static RPRGauge JobGauge => Service.JobGauges.Get<RPRGauge>();
static RPRGauge JobGauge => Svc.Gauges.Get<RPRGauge>();

protected static byte Soul => JobGauge.Soul;

Expand Down
4 changes: 3 additions & 1 deletion RotationSolver.Basic/Rotations/Basic/SAM_Base.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
using ECommons.DalamudServices;

namespace RotationSolver.Basic.Rotations.Basic;

public abstract class SAM_Base : CustomRotation
Expand All @@ -13,7 +15,7 @@ protected static bool IsMoonTimeLessThanFlower
=> Player.StatusTime(true, StatusID.Fugetsu) < Player.StatusTime(true, StatusID.Fuka);

#region JobGauge
static SAMGauge JobGauge => Service.JobGauges.Get<SAMGauge>();
static SAMGauge JobGauge => Svc.Gauges.Get<SAMGauge>();

protected static bool HasSetsu => JobGauge.HasSetsu;

Expand Down
4 changes: 3 additions & 1 deletion RotationSolver.Basic/Rotations/Basic/SCH_Base.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
using ECommons.DalamudServices;

namespace RotationSolver.Basic.Rotations.Basic;

public abstract class SCH_Base : CustomRotation
Expand All @@ -6,7 +8,7 @@ public abstract class SCH_Base : CustomRotation
public sealed override ClassJobID[] JobIDs => new ClassJobID[] { ClassJobID.Scholar };

#region Job Gauge
static SCHGauge JobGauge => Service.JobGauges.Get<SCHGauge>();
static SCHGauge JobGauge => Svc.Gauges.Get<SCHGauge>();

protected static byte FairyGauge => JobGauge.FairyGauge;

Expand Down
4 changes: 3 additions & 1 deletion RotationSolver.Basic/Rotations/Basic/SGE_Base.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
using ECommons.DalamudServices;

namespace RotationSolver.Basic.Rotations.Basic;

public abstract class SGE_Base : CustomRotation
Expand All @@ -6,7 +8,7 @@ public abstract class SGE_Base : CustomRotation
public sealed override ClassJobID[] JobIDs => new ClassJobID[] { ClassJobID.Sage };

#region Job Gauge
static SGEGauge JobGauge => Service.JobGauges.Get<SGEGauge>();
static SGEGauge JobGauge => Svc.Gauges.Get<SGEGauge>();

protected static bool HasEukrasia => JobGauge.Eukrasia;
protected static byte Addersgall => JobGauge.Addersgall;
Expand Down
6 changes: 4 additions & 2 deletions RotationSolver.Basic/Rotations/Basic/SMN_Base.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
namespace RotationSolver.Basic.Rotations.Basic;
using ECommons.DalamudServices;

namespace RotationSolver.Basic.Rotations.Basic;

public abstract class SMN_Base : CustomRotation
{
Expand All @@ -9,7 +11,7 @@ public abstract class SMN_Base : CustomRotation

protected static bool InPhoenix => Service.GetAdjustedActionId(ActionID.AstralFlow) == ActionID.Rekindle;
#region JobGauge
static SMNGauge JobGauge => Service.JobGauges.Get<SMNGauge>();
static SMNGauge JobGauge => Svc.Gauges.Get<SMNGauge>();

protected static bool HasAetherflowStacks => JobGauge.HasAetherflowStacks;

Expand Down
4 changes: 3 additions & 1 deletion RotationSolver.Basic/Rotations/Basic/WAR_Base.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
using ECommons.DalamudServices;

namespace RotationSolver.Basic.Rotations.Basic;

public abstract class WAR_Base : CustomRotation
Expand All @@ -6,7 +8,7 @@ public abstract class WAR_Base : CustomRotation

public sealed override ClassJobID[] JobIDs => new ClassJobID[] { ClassJobID.Warrior, ClassJobID.Marauder };

static WARGauge JobGauge => Service.JobGauges.Get<WARGauge>();
static WARGauge JobGauge => Svc.Gauges.Get<WARGauge>();

protected static byte BeastGauge => JobGauge.BeastGauge;

Expand Down
4 changes: 3 additions & 1 deletion RotationSolver.Basic/Rotations/Basic/WHM_Base.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
using ECommons.DalamudServices;

namespace RotationSolver.Basic.Rotations.Basic;

public abstract class WHM_Base : CustomRotation
Expand All @@ -6,7 +8,7 @@ public abstract class WHM_Base : CustomRotation
public override MedicineType MedicineType => MedicineType.Mind;

#region Job Gauge
private static WHMGauge JobGauge => Service.JobGauges.Get<WHMGauge>();
private static WHMGauge JobGauge => Svc.Gauges.Get<WHMGauge>();

protected static byte Lily => JobGauge.Lily;

Expand Down
3 changes: 0 additions & 3 deletions RotationSolver.Basic/Service.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,6 @@ public unsafe static IEnumerable<IntPtr> GetAddons<T>() where T : struct
[PluginService]
private static DataManager DataManager { get; set; }

[PluginService]
internal static JobGauges JobGauges { get; private set; }

[PluginService]
public static ObjectTable ObjectTable { get; private set; }

Expand Down

0 comments on commit 0cdb7ae

Please sign in to comment.