Package org.rspeer.game.service.combat
Class Attack
- java.lang.Object
-
- org.rspeer.game.service.combat.Attack
-
public class Attack extends Object
-
-
Constructor Summary
Constructors Constructor Description Attack(PathingEntity<?> source, PathingEntity<?> target, int tick, Map<Equipment.Slot,Item> equipmentSnapshot)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<Equipment.Slot,Item>getEquipmentSnapshot()PathingEntity<?>getSource()PathingEntity<?>getTarget()intgetTick()intgetTicksElapsed()
-
-
-
Constructor Detail
-
Attack
public Attack(PathingEntity<?> source, PathingEntity<?> target, int tick, Map<Equipment.Slot,Item> equipmentSnapshot)
-
-
Method Detail
-
getSource
public PathingEntity<?> getSource()
- Returns:
- The entity that dealt the attack. This may be null if the attacker was out of view when dealing the attack to the target
-
getTarget
public PathingEntity<?> getTarget()
- Returns:
- The entity that received the attack
-
getTick
public int getTick()
- Returns:
- The tick at which this attack occurred
-
getTicksElapsed
public int getTicksElapsed()
- Returns:
- The number of ticks since the attack occurred
-
getEquipmentSnapshot
public Map<Equipment.Slot,Item> getEquipmentSnapshot()
- Returns:
- A snapshot of the visible items the source was wearing when attacking the target. Note that for npcs this will be empty, and for players other than the local player, ring and quiver slot item data is not made present and therefore not in this collection
-
-