Class Attack

java.lang.Object
org.rspeer.game.service.combat.Attack
Direct Known Subclasses:
Debuff

public class Attack extends Object
  • Constructor Details

  • Method Details

    • getEventSource

      public CombatEventSource getEventSource()
    • 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
    • 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

      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
    • toString

      public String toString()
      Overrides:
      toString in class Object