Class CombatMonitoringService

java.lang.Object
org.rspeer.game.service.combat.CombatMonitoringService
All Implemented Interfaces:
org.rspeer.event.Service, CombatService

public class CombatMonitoringService extends Object implements CombatService
  • Constructor Details

    • CombatMonitoringService

      public CombatMonitoringService()
  • Method Details

    • getAttacksFrom

      public Deque<Attack> getAttacksFrom(PathingEntity<?> entity, int lookbackTicks)
      Description copied from interface: CombatService
      Returns a deque of attacks recently performed by the specified entity.

      The result is ordered with the most recent attack at the front (accessible via peekFirst()) and the oldest within the lookback window at the back.

      Specified by:
      getAttacksFrom in interface CombatService
      Parameters:
      entity - the entity whose outgoing attacks should be retrieved
      lookbackTicks - the maximum number of ticks to search backward in history
      Returns:
      a deque of outgoing attacks, newest first (never null)
    • getAttacksAgainst

      public Deque<Attack> getAttacksAgainst(PathingEntity<?> entity, int lookbackTicks)
      Description copied from interface: CombatService
      Returns a deque of attacks recently performed against the specified entity.

      The result is ordered with the most recent incoming attack at the front (accessible via peekFirst()) and the oldest within the lookback window at the back.

      Specified by:
      getAttacksAgainst in interface CombatService
      Parameters:
      entity - the target entity whose incoming attacks should be retrieved
      lookbackTicks - the maximum number of ticks to search backward in history
      Returns:
      a deque of incoming attacks, newest first (never null)
    • getDebuffs

      public Deque<Debuff> getDebuffs(PathingEntity<?> entity, int lookbackTicks)
      Specified by:
      getDebuffs in interface CombatService
      Parameters:
      entity - the entity whose debuffs should be retrieved
      lookbackTicks - the maximum number of ticks to search backward in history
      Returns:
      a deque of debuff attacks that this entity was hit by, newest first (never null)