Package org.rspeer.game.service.combat
Class CombatMonitoringService
- java.lang.Object
-
- org.rspeer.game.service.combat.CombatMonitoringService
-
- All Implemented Interfaces:
Service,CombatService
public class CombatMonitoringService extends Object implements CombatService
-
-
Constructor Summary
Constructors Constructor Description CombatMonitoringService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Deque<Attack>getAttacksAgainst(PathingEntity<?> entity, int lookbackTicks)Returns a deque of attacks recently performed against the specified entity.Deque<Attack>getAttacksFrom(PathingEntity<?> entity, int lookbackTicks)Returns a deque of attacks recently performed by the specified entity.-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.rspeer.game.service.combat.CombatService
getAttackCooldownTicks, getAttacksAgainst, getAttacksFrom
-
Methods inherited from interface org.rspeer.event.Service
onSubscribe, onUnsubscribe
-
-
-
-
Method Detail
-
getAttacksFrom
public Deque<Attack> getAttacksFrom(PathingEntity<?> entity, int lookbackTicks)
Description copied from interface:CombatServiceReturns 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:
getAttacksFromin interfaceCombatService- Parameters:
entity- the entity whose outgoing attacks should be retrievedlookbackTicks- 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:CombatServiceReturns 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:
getAttacksAgainstin interfaceCombatService- Parameters:
entity- the target entity whose incoming attacks should be retrievedlookbackTicks- the maximum number of ticks to search backward in history- Returns:
- a deque of incoming attacks, newest first (never
null)
-
-