Mystic Doors review + Togglable SrvMessage-BossHP + Map-Event patch

Reviewed Mystic Doors.
Fixed several issues showing up on Duey in uncommon scenarios.
Fixed a concurrency issue with XMLDomMapleData.
Scheduled forward the "lock disposal" action within the source. Now, it's expected that, after a set while, no method should require usage of a disposed lock and, during that while, a supposed "disposed lock" is still available to run (although no new processes is expected to require use of these locks).
Fixed concurrency issues with player's current event instance, generating several inconsistencies when swiftly registering/unregistering from events.
Implemented a mutually exclusive approach for server message - Boss HPbar.
Fixed item-making Kage requiring lv71~80 ETC instead of the expected 81~90.
Removed the possibility to buy cosmetic coupons with mesos through the NPCs.
Sleepywood JQ's no longer gives cash items when they finish the quest repeatedly.
Added Duey trucks in several maps lacking it. Added NPC Duey in New Leaf City.
Fixed scripted quests not calculating QUEST_RATE (if applied) when rewarding experience and meso.
This commit is contained in:
ronancpl
2018-08-07 23:37:24 -03:00
parent cc541f39d5
commit 4c25c07e28
173 changed files with 38064 additions and 37254 deletions
+14 -15
View File
@@ -22,7 +22,6 @@
package server.maps;
import java.awt.Point;
import java.util.List;
import tools.Pair;
import server.MaplePortal;
@@ -43,7 +42,7 @@ public class MapleDoor {
private MapleDoorObject townDoor;
private MapleDoorObject areaDoor;
public MapleDoor(MapleCharacter owner, Point targetPosition) {
this.ownerId = owner.getId();
this.target = owner.getMap();
@@ -55,11 +54,11 @@ public class MapleDoor {
if(posStatus == null) {
this.town = this.target.getReturnMap();
this.townPortal = getDoorPortal(owner.getDoorSlot());
this.townPortal = getTownDoorPortal(owner.getDoorSlot());
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 = new MapleDoorObject(ownerId, town, target, townPortal.getId(), targetPosition, townPortal.getPosition());
this.townDoor = new MapleDoorObject(ownerId, target, town, -1, townPortal.getPosition(), targetPosition);
this.areaDoor.setPairOid(this.townDoor.getObjectId());
this.townDoor.setPairOid(this.areaDoor.getObjectId());
@@ -74,20 +73,20 @@ public class MapleDoor {
}
}
private MaplePortal getDoorPortal(int slot) {
List<MaplePortal> avail = town.getAvailableDoorPortals();
public void updateDoorPortal(MapleCharacter owner) {
int slot = owner.fetchDoorSlot();
try {
return avail.get(slot);
} catch (IndexOutOfBoundsException e) {
try {
return avail.get(0);
} catch (IndexOutOfBoundsException ex) {
return null;
}
MaplePortal nextTownPortal = getTownDoorPortal(slot);
if(nextTownPortal != null) {
townPortal = nextTownPortal;
areaDoor.update(nextTownPortal.getId(), nextTownPortal.getPosition());
}
}
private MaplePortal getTownDoorPortal(int doorid) {
return town.getDoorPortal(doorid);
}
public int getOwnerId() {
return ownerId;
}