Skip to content

Commit

Permalink
Add _raisePlayerFirst config to prioritize raising players
Browse files Browse the repository at this point in the history
Introduce a new configuration option `_raisePlayerFirst` in the `Configs` class to prioritize raising dead players over performing healing or defensive actions. Update the `CustomRotation` class to check this new configuration and adjust the `RaiseSpell` method accordingly. Temporarily set `TargetOverride` to `TargetType.Death` to ensure correct target selection for raising. Ensure Swiftcast is used for raising if `RaisePlayerByCasting` is enabled and Swiftcast is on cooldown.
  • Loading branch information
LTS-FFXIV committed Dec 1, 2024
1 parent 0ed2ccd commit cb3839e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
5 changes: 5 additions & 0 deletions RotationSolver.Basic/Configuration/Configs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,11 @@ public const string
PvEFilter = JobFilterType.Raise, PvPFilter = JobFilterType.NoJob)]
private static readonly bool _raisePlayerBySwift = true;

[JobConfig, UI("Prioritize raising dead players over Healing/Defense.",
Filter = HealingActionCondition, Section = 2,
PvEFilter = JobFilterType.Raise, PvPFilter = JobFilterType.NoJob)]
private static readonly bool _raisePlayerFirst = false;

[JobConfig, UI("Raise styles",
Filter = HealingActionCondition, Section = 2,
PvEFilter = JobFilterType.Raise, PvPFilter = JobFilterType.NoJob)]
Expand Down
18 changes: 16 additions & 2 deletions RotationSolver.Basic/Rotations/CustomRotation_GCD.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@ partial class CustomRotation
if (MyInterruptGCD(out act)) return act;
}

IBaseAction.TargetOverride = TargetType.Death;

if (Service.Config.RaisePlayerFirst)
{
if (RaiseSpell(out act, false)) return act;

if (Service.Config.RaisePlayerByCasting && SwiftcastPvE.Cooldown.IsCoolingDown && RaiseSpell(out act, true)) return act;
}

IBaseAction.TargetOverride = null;

if (DataCenter.MergedStatus.HasFlag(AutoStatus.MoveForward)
&& MoveForwardGCD(out act))
{
Expand Down Expand Up @@ -76,9 +87,12 @@ partial class CustomRotation

IBaseAction.TargetOverride = TargetType.Death;

if (RaiseSpell(out act, false)) return act;
if (!Service.Config.RaisePlayerFirst)
{
if (RaiseSpell(out act, false)) return act;

if (Service.Config.RaisePlayerByCasting && SwiftcastPvE.Cooldown.IsCoolingDown && RaiseSpell(out act, true)) return act;
if (Service.Config.RaisePlayerByCasting && SwiftcastPvE.Cooldown.IsCoolingDown && RaiseSpell(out act, true)) return act;
}

IBaseAction.TargetOverride = null;

Expand Down

0 comments on commit cb3839e

Please sign in to comment.