Skip to content

Commit 15f25f0

Browse files
authored
Merge pull request #8 from FFXIV-CombatReborn/pingcheckrevert
revert add skip ping config
2 parents 8a68d99 + 6ce3c77 commit 15f25f0

File tree

9 files changed

+14
-30
lines changed

9 files changed

+14
-30
lines changed

RotationSolver.Basic/Actions/ActionCooldownInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ internal bool CooldownCheck(bool isEmpty, bool onLastAbility, bool ignoreClippin
153153
}
154154
else
155155
{
156-
if (!HasOneCharge && RecastTimeRemainOneChargeRaw > DataCenter.AnimationLocktime) return false;
156+
if (!HasOneCharge && RecastTimeRemainOneChargeRaw > DataCenter.ActionRemain) return false;
157157
}
158158
}
159159

RotationSolver.Basic/Actions/BaseItem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ public virtual unsafe bool CanUse(out IAction item, bool clippingCheck = true)
175175

176176
var remain = Cooldown.RecastTimeOneChargeRaw - Cooldown.RecastTimeElapsedRaw;
177177

178-
if (remain > DataCenter.AnimationLocktime) return false;
178+
if (remain > DataCenter.ActionRemain) return false;
179179

180180
if (clippingCheck && DataCenter.WeaponRemain > 0)
181181
{

RotationSolver.Basic/Configuration/Configs.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -410,10 +410,6 @@ public const string
410410
Filter = TimelineFilter)]
411411
private static readonly bool _enableTimelineMovement = false;
412412

413-
[ConditionBool, UI("Skip the Ping Check. Enable if you use Bossmod Action Tweaks or Noclippy.",
414-
Filter = BasicTimer, Section = 2)]
415-
private static readonly bool _noPingCheck = false;
416-
417413
[UI("The max ping that RS can get to before skipping to the next action.",
418414
Filter = BasicTimer)]
419415
[Range(0.01f, 0.5f, ConfigUnitType.Seconds, 0.002f)]

RotationSolver.Basic/DataCenter.cs

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -204,36 +204,24 @@ public static float GCDTime(uint gcdCount = 0, float offset = 0)
204204
/// <summary>
205205
/// Time to the next action
206206
/// </summary>
207-
public static unsafe float AnimationLocktime => *(float*)((IntPtr)ActionManager.Instance() + 0x8);
207+
public static unsafe float ActionRemain => *(float*)((IntPtr)ActionManager.Instance() + 0x8);
208208

209209
public static float AbilityRemain
210210
{
211211
get
212212
{
213213
var gcdRemain = WeaponRemain;
214214
// Check if we should account for the animation lock and ping.
215-
if (gcdRemain - MinAnimationLock - Ping <= AnimationLocktime)
215+
if (gcdRemain - MinAnimationLock - Ping <= ActionRemain)
216216
{
217217
return gcdRemain + MinAnimationLock + Ping;
218218
}
219-
return AnimationLocktime;
219+
return ActionRemain;
220220
}
221221
}
222222

223223
// Update the property to conditionally use AbilityRemain based on the NoPingCheck setting.
224-
public static float NextAbilityToNextGCD
225-
{
226-
get
227-
{
228-
// Check if NoPingCheck is false; if so, use AbilityRemain.
229-
if (!Service.Config.NoPingCheck)
230-
{
231-
return AbilityRemain - WeaponRemain;
232-
}
233-
// Otherwise, use the existing logic.
234-
return WeaponRemain - AnimationLocktime;
235-
}
236-
}
224+
public static float NextAbilityToNextGCD => WeaponRemain - ActionRemain;
237225

238226
public static float CastingTotal { get; internal set; }
239227
#endregion
@@ -408,7 +396,7 @@ public static float DPSTaken
408396
public static ActionID LastGCD { get; private set; } = 0;
409397

410398
public static ActionID LastAbility { get; private set; } = 0;
411-
public static float Ping => Service.Config.NoPingCheck ? 0 : Math.Min(Math.Min(RTT, FetchTime), Service.Config.MaxPing);
399+
public static float Ping => Math.Min(Math.Min(RTT, FetchTime), Service.Config.MaxPing);
412400

413401
public static float RTT { get; internal set; } = 0.05f;
414402
public static float FetchTime { get; private set; } = 0.05f;

RotationSolver.Basic/Rotations/Basic/BlackMageRotation.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,12 +218,12 @@ static partial void ModifyTriplecastPvE(ref ActionSetting setting)
218218

219219
static partial void ModifyTransposePvE(ref ActionSetting setting)
220220
{
221-
setting.ActionCheck = () => DataCenter.AnimationLocktime <= ElementTimeRaw;
221+
setting.ActionCheck = () => DataCenter.ActionRemain <= ElementTimeRaw;
222222
}
223223

224224
static partial void ModifyUmbralSoulPvE(ref ActionSetting setting)
225225
{
226-
setting.ActionCheck = () => JobGauge.InUmbralIce && DataCenter.AnimationLocktime <= ElementTimeRaw;
226+
setting.ActionCheck = () => JobGauge.InUmbralIce && DataCenter.ActionRemain <= ElementTimeRaw;
227227
}
228228

229229
/// <summary>

RotationSolver/UI/NextActionWindow.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public static unsafe void DrawGcdCooldown(float width, bool drawTittle)
6767

6868
ImGui.ProgressBar(group->Elapsed / group->Total, new Vector2(width, height), string.Empty);
6969

70-
var actionRemain = DataCenter.AnimationLocktime;
70+
var actionRemain = DataCenter.ActionRemain;
7171
if (remain > actionRemain + 0.6f + DataCenter.Ping)
7272
{
7373
var value = total - remain + actionRemain;

RotationSolver/UI/RotationConfigWindow.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2424,7 +2424,7 @@ private static unsafe void DrawStatus()
24242424
ImGui.Text("DPSTaken: " + DataCenter.DPSTaken.ToString());
24252425
ImGui.Text("TimeToNext: " + DataCenter.NextAbilityToNextGCD.ToString());
24262426
ImGui.Text("WeaponElapsed: " + DataCenter.WeaponElapsed.ToString());
2427-
ImGui.Text("AnimationLock: " + DataCenter.AnimationLocktime.ToString());
2427+
ImGui.Text("AnimationLock: " + DataCenter.ActionRemain.ToString());
24282428

24292429
ImGui.Text("Have pet: " + DataCenter.HasPet.ToString());
24302430
ImGui.Text("Hostile Near Count: " + DataCenter.NumberOfHostilesInRange.ToString());
@@ -2520,7 +2520,7 @@ private static void DrawNextAction()
25202520

25212521
ImGui.Text(ActionUpdater.NextAction?.Name ?? "null");
25222522
ImGui.Text("Ability Remain: " + DataCenter.AbilityRemain.ToString());
2523-
ImGui.Text("Action Remain: " + DataCenter.AnimationLocktime.ToString());
2523+
ImGui.Text("Action Remain: " + DataCenter.ActionRemain.ToString());
25242524
ImGui.Text("Weapon Remain: " + DataCenter.WeaponRemain.ToString());
25252525
ImGui.Text("Animation Lock Delay: " + ActionManagerHelper.GetCurrentAnimationLock().ToString());
25262526
}

RotationSolver/Updaters/ActionUpdater.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ internal unsafe static bool CanDoAction()
292292
var nextAction = NextAction;
293293
if (nextAction == null) return false;
294294

295-
var timeToNext = DataCenter.AnimationLocktime;
295+
var timeToNext = DataCenter.ActionRemain;
296296

297297
////No time to use 0gcd
298298
//if (timeToNext + nextAction.AnimationLockTime

RotationSolver/Watcher.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ private static void ActionFromSelf(ActionEffectSet set)
231231
OtherConfiguration.AnimationLockTime[id] = set.Header.AnimationLockTime;
232232
}
233233

234-
if (set.TargetEffects.Length == 0) return;
234+
if (!set.TargetEffects.Any()) return;
235235

236236
var action = set.Action;
237237
var tar = set.Target;

0 commit comments

Comments
 (0)