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

Commit

Permalink
fix: add maxPing.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Apr 22, 2023
1 parent 4665771 commit a4a55de
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions RotationSolver.Basic/DataCenter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ public static float DPSTaken
public static float Ping { get; private set; } = 0.07f;

public const float MinAnimationLock = 0.6f;
const float MAX_PING = 0.2f;
public static unsafe void AddActionRec(Action act)
{
var id = (ActionID)act.RowId;
Expand All @@ -317,15 +318,15 @@ public static unsafe void AddActionRec(Action act)
LastAction = LastGCD = id;
if (ActionManager.GetAdjustedCastTime(ActionType.Spell, (uint)id) == 0)
{
Ping = WeaponElapsed;
Ping = Math.Min(MAX_PING, WeaponElapsed);
}
break;
case ActionCate.Ability:
LastAction = LastAbility = id;

if (!act.IsRealGCD() && ActionManager.GetMaxCharges((uint)id, Service.Player.Level) < 2)
{
Ping = ActionManager.Instance()->GetRecastGroupDetail(act.CooldownGroup - 1)->Elapsed;
Ping = Math.Min(MAX_PING, ActionManager.Instance()->GetRecastGroupDetail(act.CooldownGroup - 1)->Elapsed);
}
break;
default:
Expand Down

0 comments on commit a4a55de

Please sign in to comment.