forked from 2009Scape/Server
Protect from Summoning prayer now prevents NPC aggression when active
This commit is contained in:
parent
fa808accd4
commit
e5e6006212
1 changed files with 5 additions and 0 deletions
|
|
@ -9,6 +9,8 @@ import core.game.node.entity.player.info.Rights;
|
|||
import core.game.world.GameWorld;
|
||||
import core.tools.RandomFunction;
|
||||
|
||||
import core.game.node.entity.player.link.prayer.PrayerType;
|
||||
|
||||
/**
|
||||
* Used to handle entity aggressiveness.
|
||||
* @author Emperor
|
||||
|
|
@ -81,6 +83,9 @@ public final class AggressiveHandler {
|
|||
}
|
||||
Entity target = behavior.getLogicalTarget(entity, behavior.getPossibleTargets(entity, radius));
|
||||
if (target instanceof Player) {
|
||||
if (((Player) target).getPrayer().get(PrayerType.PROTECT_FROM_SUMMONING)) {
|
||||
return false;
|
||||
}
|
||||
if (target.getAttribute("ignore_aggression", false)) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue