diff --git a/src/org/apollo/game/action/Action.java b/src/org/apollo/game/action/Action.java index 2c34b19e..baccd3ee 100644 --- a/src/org/apollo/game/action/Action.java +++ b/src/org/apollo/game/action/Action.java @@ -41,7 +41,7 @@ public abstract class Action extends ScheduledTask { * * @return The mob. */ - public T getMob() { + public final T getMob() { return mob; } diff --git a/src/org/apollo/game/action/DistancedAction.java b/src/org/apollo/game/action/DistancedAction.java index 5b599c33..a462a49f 100644 --- a/src/org/apollo/game/action/DistancedAction.java +++ b/src/org/apollo/game/action/DistancedAction.java @@ -54,12 +54,11 @@ public abstract class DistancedAction extends Action { } @Override - public void execute() { - if (reached) { - // some actions (e.g. agility) will cause the player to move away again - // so we don't check once the player got close enough once - executeAction(); // TODO checking the walking queue size is a really cheap fix, and relies on the client not - // being edited... this class needs to be completely re-written. + public final void execute() { + if (reached) { // Don't check again in case the player has moved away since it was reached + executeAction(); + // TODO checking the walking queue size is a really cheap fix, and relies on the client not + // being edited... this class needs to be completely re-written. } else if (mob.getPosition().getDistance(position) <= distance && mob.getWalkingQueue().size() == 0) { reached = true; setDelay(delay); diff --git a/src/org/apollo/game/scheduling/ScheduledTask.java b/src/org/apollo/game/scheduling/ScheduledTask.java index d97ac584..1791684b 100644 --- a/src/org/apollo/game/scheduling/ScheduledTask.java +++ b/src/org/apollo/game/scheduling/ScheduledTask.java @@ -65,7 +65,7 @@ public abstract class ScheduledTask { * @param delay The delay. * @throws IllegalArgumentException If the delay is less than or equal to zero. */ - public void setDelay(int delay) { + public final void setDelay(int delay) { if (delay < 0) { throw new IllegalArgumentException("Delay cannot be less than 0."); }