White scroll & PiratePQ fix + Party for starters + concurrency protection on event scripts

Fixed successful scrolled items not using up an upgrade slot when using white scroll. Fixed some issues with the PiratePQ and added a "clear all boxes to complete a stage"-mode. Added "Party for Starters" feature. Added concurrency protection on event script modules.
This commit is contained in:
ronancpl
2017-10-13 03:31:51 -03:00
parent 6e1442af30
commit 1ec7487bd3
96 changed files with 470 additions and 109 deletions

View File

@@ -22,6 +22,7 @@
package server.maps;
import java.awt.Point;
import java.util.List;
import tools.Pair;
import server.MaplePortal;
@@ -49,7 +50,7 @@ public class MapleDoor {
if(target.canDeployDoor(targetPosition)) {
if(ServerConstants.USE_ENFORCE_MDOOR_POSITION) {
posStatus = target.getDoorPositionStatus(targetPosition);
posStatus = target.getDoorPositionStatus(targetPosition);
}
if(posStatus == null) {
@@ -74,11 +75,13 @@ public class MapleDoor {
}
private MaplePortal getDoorPortal(int slot) {
List<MaplePortal> avail = town.getAvailableDoorPortals();
try {
return town.getAvailableDoorPortals().get(slot);
return avail.get(slot);
} catch (IndexOutOfBoundsException e) {
try {
return town.getAvailableDoorPortals().get(0);
return avail.get(0);
} catch (IndexOutOfBoundsException ex) {
return null;
}