Skip to content

Commit b3d2d50

Browse files
authored
Merge pull request #802 from FFXIV-CombatReborn/raisecancel
Refactor combat checks and enhance casting logic
2 parents 46338a5 + 7ac7631 commit b3d2d50

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

BasicRotations/Duty/PhantomDefault.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -604,12 +604,12 @@ public override bool GeneralGCD(out IAction? act)
604604
return true;
605605
}
606606

607-
if (HolyCannonPvE.CanUse(out act))
607+
if (SilverCannonPvE.CanUse(out act))
608608
{
609609
return true;
610610
}
611611

612-
if (SilverCannonPvE.CanUse(out act))
612+
if (HolyCannonPvE.CanUse(out act))
613613
{
614614
return true;
615615
}

RotationSolver/Updaters/MiscUpdater.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,13 @@ private static unsafe void UpdateCancelCast()
124124
&& Svc.Objects.SearchById(Player.Object.CastTargetObjectId) is IBattleChara b
125125
&& b.IsEnemy() && b.CurrentHp == 0;
126126

127+
// Cancel raise cast if target already has Raise status
128+
bool tarHasRaise = false;
129+
if (Svc.Objects.SearchById(Player.Object.CastTargetObjectId) is IBattleChara battleChara)
130+
{
131+
tarHasRaise = battleChara.HasStatus(false, StatusID.Raise);
132+
}
133+
127134
float[] statusTimes = GetStatusTimes();
128135

129136
float minStatusTime = float.MaxValue;
@@ -137,7 +144,7 @@ private static unsafe void UpdateCancelCast()
137144

138145
bool stopDueStatus = statusTimes.Length > 0 && minStatusTime > Player.Object.TotalCastTime - Player.Object.CurrentCastTime && minStatusTime < 5;
139146

140-
if (_tarStopCastDelay.Delay(tarDead) || stopDueStatus)
147+
if (_tarStopCastDelay.Delay(tarDead) || stopDueStatus || tarHasRaise)
141148
{
142149
UIState* uiState = UIState.Instance();
143150
if (uiState != null)

0 commit comments

Comments
 (0)