mirror of
https://github.com/moparisthebest/MoparClassic
synced 2024-12-21 23:18:52 -05:00
Partial fix for issue #23. Objects that are still 'walkable' should be
excluded from the additional distance.
This commit is contained in:
parent
03a200a1bb
commit
1f064e322a
@ -29,8 +29,8 @@ public abstract class WalkToPointEvent extends DelayedEvent {
|
||||
|
||||
public final void run() {
|
||||
if (stop && owner.withinRange(location, radius)) {
|
||||
owner.resetPath();
|
||||
arrived();
|
||||
owner.resetPath();
|
||||
} else if (owner.hasMoved()) {
|
||||
return; // We're still moving
|
||||
} else if (owner.withinRange(location, radius)) {
|
||||
|
@ -75,8 +75,9 @@ public class PickupItem implements PacketHandler {
|
||||
}
|
||||
|
||||
player.setStatus(Action.TAKING_GITEM);
|
||||
int distance = tile.hasGameObject() ? 1 : 0;
|
||||
Instance.getDelayedEventHandler().add(
|
||||
new WalkToPointEvent(player, location, 0, true) {
|
||||
new WalkToPointEvent(player, location, distance, true) {
|
||||
public void arrived() {
|
||||
if (owner.isBusy() || owner.isRanging()
|
||||
|| !tile.hasItem(item) || !owner.nextTo(item)
|
||||
|
Loading…
Reference in New Issue
Block a user