More Masteria quests + several minor fixes
Added more quests on Masteria and updated drop data in the region. Fixed mystic door on slopes deploying players unproperly. Fixed mounts equipped by low level players crashing the client.
This commit is contained in:
@@ -63,7 +63,7 @@ public class MapleShopFactory {
|
||||
|
||||
public MapleShop getShopForNPC(int npcId) {
|
||||
if (npcShops.containsKey(npcId)) {
|
||||
npcShops.get(npcId);
|
||||
return npcShops.get(npcId);
|
||||
}
|
||||
return loadShop(npcId, false);
|
||||
}
|
||||
|
||||
@@ -846,7 +846,7 @@ public class MapleStatEffect {
|
||||
Point doorPosition = new Point(applyto.getPosition().x, y);
|
||||
MapleDoor door = new MapleDoor(applyto, doorPosition);
|
||||
|
||||
if(door.getOwnerId() != -1) {
|
||||
if(door.getOwnerId() > -1) {
|
||||
if (applyto.getParty() != null) {
|
||||
for (MaplePartyCharacter partyMember : applyto.getParty().getMembers()) {
|
||||
partyMember.getPlayer().addDoor(door.getOwnerId(), door);
|
||||
@@ -860,7 +860,9 @@ public class MapleStatEffect {
|
||||
door.getTarget().spawnDoor(door.getAreaDoor());
|
||||
door.getTown().spawnDoor(door.getTownDoor());
|
||||
} else {
|
||||
applyto.dropMessage(5, "There are no door portals available for the town at this moment. Try again later.");
|
||||
if(door.getOwnerId() == -1) applyto.dropMessage(5, "There are no door portals available for the town at this moment. Try again later.");
|
||||
else applyto.dropMessage(5, "This position is not suitable for a Mystic Door, try elsewhere.");
|
||||
|
||||
applyto.cancelBuffStats(MapleBuffStat.SOULARROW); // cancel door buff
|
||||
}
|
||||
applyto.disableDoor();
|
||||
|
||||
@@ -45,17 +45,21 @@ public class MapleDoor {
|
||||
this.ownerId = owner.getId();
|
||||
this.target = owner.getMap();
|
||||
|
||||
this.town = this.target.getReturnMap();
|
||||
this.townPortal = allocateFreePortal();
|
||||
|
||||
if(townPortal != null) {
|
||||
this.areaDoor = new MapleDoorObject(ownerId, town, target, false, targetPosition, townPortal.getPosition());
|
||||
this.townDoor = new MapleDoorObject(ownerId, target, town, true, townPortal.getPosition(), targetPosition);
|
||||
|
||||
this.areaDoor.setPairOid(this.townDoor.getObjectId());
|
||||
this.townDoor.setPairOid(this.areaDoor.getObjectId());
|
||||
if(target.canDeployDoor(targetPosition)) {
|
||||
this.town = this.target.getReturnMap();
|
||||
this.townPortal = allocateFreePortal();
|
||||
|
||||
if(townPortal != null) {
|
||||
this.areaDoor = new MapleDoorObject(ownerId, town, target, false, targetPosition, townPortal.getPosition());
|
||||
this.townDoor = new MapleDoorObject(ownerId, target, town, true, townPortal.getPosition(), targetPosition);
|
||||
|
||||
this.areaDoor.setPairOid(this.townDoor.getObjectId());
|
||||
this.townDoor.setPairOid(this.areaDoor.getObjectId());
|
||||
} else {
|
||||
this.ownerId = -1;
|
||||
}
|
||||
} else {
|
||||
this.ownerId = -1;
|
||||
this.ownerId = -2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -433,6 +433,11 @@ public class MapleMap {
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
public boolean canDeployDoor(Point pos) {
|
||||
Point toStep = calcPointBelow(pos);
|
||||
return toStep != null && toStep.distance(pos) < 20;
|
||||
}
|
||||
|
||||
private void dropFromMonster(final MapleCharacter chr, final MapleMonster mob) {
|
||||
if (mob.dropsDisabled() || !dropsOn) {
|
||||
|
||||
Reference in New Issue
Block a user