Fixed bug preventing use of slayer boosters for slayer tasks
This commit is contained in:
@@ -61,7 +61,7 @@ public abstract class IdleAbstractNPC extends AbstractNPC {
|
|||||||
if (isInvisible()) {
|
if (isInvisible()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (getTask() != null && entity instanceof Player && getTask().levelReq > entity.getSkills().getStaticLevel(Skills.SLAYER)) {
|
if (getTask() != null && entity instanceof Player && getTask().levelReq > entity.getSkills().getLevel(Skills.SLAYER)) {
|
||||||
if(message) {
|
if(message) {
|
||||||
((Player) entity).getPacketDispatch().sendMessage("You need a higher slayer level to know how to wound this monster.");
|
((Player) entity).getPacketDispatch().sendMessage("You need a higher slayer level to know how to wound this monster.");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -390,7 +390,7 @@ public class NPC extends Entity {
|
|||||||
super.checkImpact(state);
|
super.checkImpact(state);
|
||||||
Entity entity = state.getAttacker();
|
Entity entity = state.getAttacker();
|
||||||
behavior.beforeDamageReceived(this, entity, state);
|
behavior.beforeDamageReceived(this, entity, state);
|
||||||
if (task != null && entity instanceof Player && task.levelReq > entity.getSkills().getStaticLevel(Skills.SLAYER)) {
|
if (task != null && entity instanceof Player && task.levelReq > entity.getSkills().getLevel(Skills.SLAYER)) {
|
||||||
state.neutralizeHits();
|
state.neutralizeHits();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -400,7 +400,7 @@ public class NPC extends Entity {
|
|||||||
if (isInvisible()) {
|
if (isInvisible()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (task != null && entity instanceof Player && task.levelReq > entity.getSkills().getStaticLevel(Skills.SLAYER)) {
|
if (task != null && entity instanceof Player && task.levelReq > entity.getSkills().getLevel(Skills.SLAYER)) {
|
||||||
if(message) {
|
if(message) {
|
||||||
((Player) entity).getPacketDispatch().sendMessage("You need a higher slayer level to know how to wound this monster.");
|
((Player) entity).getPacketDispatch().sendMessage("You need a higher slayer level to know how to wound this monster.");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user