RuneHive-Game
Loading...
Searching...
No Matches
ZulrahListener.java
Go to the documentation of this file.
1package com.runehive.content.activity.impl.zulrah;
2
3import com.runehive.content.activity.ActivityListener;
4import com.runehive.game.world.entity.mob.Mob;
5
6/**
7 * The zulrah activity combat listener.
8 *
9 * @author Daniel
10 */
11public class ZulrahListener extends ActivityListener<ZulrahActivity> {
12
13 /** Constructs a new <code>ZulrahListener</code>. */
17
18 @Override
19 public boolean canOtherAttack(Mob attacker, Mob defender) {
20 return true;
21 }
22
23 @Override
24 public boolean canAttack(Mob attacker, Mob defender) {
25 if (attacker.isNpc() && attacker.getNpc().id != 2045) {
26 return attacker.getNpc().canAttack;
27 }
28 return true;
29 }
30}
ActivityListener(T activity)
Constructs a new ActivityListener for a activity.
ZulrahListener(ZulrahActivity activity)
Constructs a new ZulrahListener.
Handles the mob class.
Definition Mob.java:66
final boolean isNpc()
Check if an entity is an npc.
Definition Mob.java:550