RuneHive-Tarnish
Neural OSRS Enhancement Framework
Loading...
Searching...
No Matches
CombatData.java
1package com.osroyale.game.world.entity.combat.hit;
2
3import com.osroyale.game.world.entity.combat.strategy.CombatStrategy;
4import com.osroyale.game.world.entity.mob.Mob;
5
11public final class CombatData<T extends Mob> {
12
14 private final T attacker;
15
17 private final Mob defender;
18
20 private final CombatHit hit;
21
23 private final CombatStrategy<? super T> strategy;
24
26 private final boolean lastHit;
27
29 public CombatData(T attacker, Mob defender, CombatHit hit, CombatStrategy<? super T> strategy, boolean lastHit) {
30 this.attacker = attacker;
31 this.defender = defender;
32 this.hit = hit;
33 this.strategy = strategy;
34 this.lastHit = lastHit;
35 }
36
38 public T getAttacker() {
39 return attacker;
40 }
41
43 public Mob getDefender() {
44 return defender;
45 }
46
48 public CombatHit getHit() {
49 return hit;
50 }
51
53 public int getHitDelay() {
54 return hit.getHitDelay();
55 }
56
58 public int getHitsplatDelay() {
59 return hit.getHitsplatDelay();
60 }
61
63 public CombatStrategy<? super T> getStrategy() {
64 return strategy;
65 }
66
68 public boolean isLastHit() {
69 return lastHit;
70 }
71
72}
CombatData(T attacker, Mob defender, CombatHit hit, CombatStrategy<? super T > strategy, boolean lastHit)