Fix map spawn

Fix map failing to spawn in some cases.
This commit is contained in:
ronancpl
2017-04-06 10:07:14 -03:00
parent 7863994a13
commit 67af338f8a
18 changed files with 155 additions and 50 deletions

View File

@@ -0,0 +1,9 @@
//Author: Ronan
function enter(pi) {
if(pi.hasItem(4031495)) pi.warp(921100301);
else pi.warp(211040100);
pi.getWarpMap(921100300).clearMapObjects();
return true;
}

View File

@@ -25,8 +25,10 @@ function enter(pi) {
pi.removeAll(4031508);
}
if (pi.getClient().getChannelServer().getMapFactory().getMap(923010000).getCharacters().size() < 1)
pi.getClient().getChannelServer().getMapFactory().getMap(923010000).killAllMonsters();
pi.warp(230000003, "out00");
if (pi.getClient().getChannelServer().getMapFactory().getMap(923010000).getCharacters().size() == 0) {
pi.getClient().getChannelServer().getMapFactory().getMap(923010000).clearMapObjects();
}
return true;
}