Class AttackFireDetector

java.lang.Object
privbot.mechanics.AttackFireDetector

public final class AttackFireDetector extends Object
Detects attack fires from caller-supplied, server-ID-space cues and separately confirmed spec-energy fires. An unrecognised or unreadable signal is UNKNOWN, not a negative. It never translates IDs or reads a client; callers must supply verified mappings and reset the detector for a new session. Single-owner, tick ordered.
  • Constructor Details

    • AttackFireDetector

      public AttackFireDetector(Map<Integer,CombatStyle> animationStyles, Set<Integer> nonAttacks, Set<Integer> rangedGraphics)
      The inputs must already use the server's IDs; missing mappings must not be guessed.
  • Method Details

    • observe

      public AttackFireDetector.Result observe(int tick, Integer animation, Integer graphic, Boolean specFired, Integer cycleTicks)
      One sample. Null input is unreadable; -1 animation/graphic means the client read no animation/graphic. cycleTicks is the known cycle for the currently worn weapon, or null. A held animation is a repeat only after the cycle's early window. An initial animation with no prior sample is not assumed to have started; a skipped tick also requires a fresh cue or independently confirmed fire before timing can resume.