mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-09 16:45:44 -07:00
Fixed unreachable grand exchange NPC exchange option
This commit is contained in:
parent
c23051db93
commit
1b996b9b82
1 changed files with 12 additions and 14 deletions
|
|
@ -267,27 +267,25 @@ public abstract class MovementPulse extends Pulse {
|
||||||
|
|
||||||
Location loc = null;
|
Location loc = null;
|
||||||
|
|
||||||
if (destinationFlag != null && overrideMethod == null) {
|
if (optionHandler != null) {
|
||||||
|
loc = optionHandler.getDestination(mover, destination);
|
||||||
|
}
|
||||||
|
else if (useHandler != null) {
|
||||||
|
loc = useHandler.getDestination((Player) mover, destination);
|
||||||
|
}
|
||||||
|
else if (isInsideEntity(mover.getLocation())) {
|
||||||
|
loc = findBorderLocation();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (loc == null && destinationFlag != null && overrideMethod == null) {
|
||||||
loc = destinationFlag.getDestination(mover, destination);
|
loc = destinationFlag.getDestination(mover, destination);
|
||||||
}
|
}
|
||||||
else if(overrideMethod != null){
|
else if(loc == null && overrideMethod != null){
|
||||||
loc = overrideMethod.invoke(mover,destination);
|
loc = overrideMethod.invoke(mover,destination);
|
||||||
if(loc == destination.getLocation() && destinationFlag != null) loc = destinationFlag.getDestination(mover,destination);
|
if(loc == destination.getLocation() && destinationFlag != null) loc = destinationFlag.getDestination(mover,destination);
|
||||||
else if (loc == destination.getLocation()) loc = null;
|
else if (loc == destination.getLocation()) loc = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (loc == null) {
|
|
||||||
if (optionHandler != null) {
|
|
||||||
loc = optionHandler.getDestination(mover, destination);
|
|
||||||
}
|
|
||||||
else if (useHandler != null) {
|
|
||||||
loc = useHandler.getDestination((Player) mover, destination);
|
|
||||||
}
|
|
||||||
else if (isInsideEntity(mover.getLocation())) {
|
|
||||||
loc = findBorderLocation();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (destination instanceof NPC)
|
if (destination instanceof NPC)
|
||||||
loc = checkForEntityPathInterrupt(loc != null ? loc : destination.getLocation());
|
loc = checkForEntityPathInterrupt(loc != null ? loc : destination.getLocation());
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue