Fixed unreachable grand exchange NPC exchange option

This commit is contained in:
Ceikry 2023-08-07 02:28:32 +00:00 committed by Ryan
parent c23051db93
commit 1b996b9b82

View file

@ -267,16 +267,6 @@ public abstract class MovementPulse extends Pulse {
Location loc = null;
if (destinationFlag != null && overrideMethod == null) {
loc = destinationFlag.getDestination(mover, destination);
}
else if(overrideMethod != null){
loc = overrideMethod.invoke(mover,destination);
if(loc == destination.getLocation() && destinationFlag != null) loc = destinationFlag.getDestination(mover,destination);
else if (loc == destination.getLocation()) loc = null;
}
if (loc == null) {
if (optionHandler != null) {
loc = optionHandler.getDestination(mover, destination);
}
@ -286,6 +276,14 @@ public abstract class MovementPulse extends Pulse {
else if (isInsideEntity(mover.getLocation())) {
loc = findBorderLocation();
}
if (loc == null && destinationFlag != null && overrideMethod == null) {
loc = destinationFlag.getDestination(mover, destination);
}
else if(loc == null && overrideMethod != null){
loc = overrideMethod.invoke(mover,destination);
if(loc == destination.getLocation() && destinationFlag != null) loc = destinationFlag.getDestination(mover,destination);
else if (loc == destination.getLocation()) loc = null;
}
if (destination instanceof NPC)