Class AttackTiming
java.lang.Object
privbot.mechanics.AttackTiming
Pure attack timing calculations, adapted from ElorinPvP's AttackClock. The caller supplies observed fires and
confirmed eats; a sent click is not evidence that an attack fired. This type does not read the client.
Unknown observations are null, and a deadline passing means an unconfirmed send expired, not that it failed.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA step-out interval, inclusive at both ends. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptionstatic IntegerThe last pending tick; null if the send or ready estimate is unreadable.static intAttack ticks lost to an eat processed atprocessedTick; a separate hold may absorb the delay.static IntegerestimatedReady(Integer firedTick, CombatStyle style, String weapon, Integer eats, Map<String, Integer> weaponOverrides) The estimated next fire tick, or null if the fire, style, or eat count is unreadable.static BooleanexpiresNow(int tick, Integer previousTick, Integer sentTick, Integer estimatedReady, Boolean unsettled) Whether this sample is the first past the deadline, including when samples skip ticks; null if unknown.static BooleanWhether a known unsettled send is still in its pending window; null if unsettled or send is unreadable.static IntegerCombine a known attack-ready estimate with the observed spell cooldown floor.static AttackTiming.WindowstepWindow(Integer firedTick, Integer estimatedReady) Window from the last confirmed fire until two ticks before the estimated next attack.
-
Field Details
-
MAGIC_ATTACK_TICKS
public static final int MAGIC_ATTACK_TICKS- See Also:
-
EAT_ATTACK_DELAY_TICKS
public static final int EAT_ATTACK_DELAY_TICKS- See Also:
-
PENDING_MIN_TICKS
public static final int PENDING_MIN_TICKS- See Also:
-
PENDING_GRACE_TICKS
public static final int PENDING_GRACE_TICKS- See Also:
-
STEP_REATTACK_TICKS
public static final int STEP_REATTACK_TICKS- See Also:
-
-
Method Details
-
readyTick
-
stepWindow
Window from the last confirmed fire until two ticks before the estimated next attack. -
estimatedReady
-
deadline
-
pending
-
expiresNow
-
eatCost
Attack ticks lost to an eat processed atprocessedTick; a separate hold may absorb the delay.
-