Class Attack
java.lang.Object
org.rspeer.game.service.combat.Attack
- Direct Known Subclasses:
Debuff
-
Constructor Summary
ConstructorsConstructorDescriptionAttack(CombatEventSource eventSource, PathingEntity<?> source, PathingEntity<?> target, int animation, int tick, Map<Equipment.Slot, Item> equipmentSnapshot) -
Method Summary
-
Constructor Details
-
Attack
public Attack(CombatEventSource eventSource, PathingEntity<?> source, PathingEntity<?> target, int animation, int tick, Map<Equipment.Slot, Item> equipmentSnapshot)
-
-
Method Details
-
getEventSource
-
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
- Returns:
- The entity that received the attack
-
getAnimation
public int getAnimation()- Returns:
- The animation that the source used for the attack. This can be -1 if the attacker was out of view
-
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
- 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
-
toString
-