Protected Trade/Quest system + Expirable quests

Added true protection against race conditions on player trades and fixed
some situational issues. Character's quest status table also received
concurrency treatment. Quests with time limit now expires properly.
Increased subtly the performance on the server start-up.
This commit is contained in:
ronancpl
2017-05-26 23:09:42 -03:00
parent 702c69897b
commit d0396e4c36
15 changed files with 229 additions and 132 deletions

View File

@@ -97,18 +97,19 @@ public class MapleMount {
}
private void increaseTiredness() {
if(owner != null) {
this.tiredness++;
owner.getMap().broadcastMessage(MaplePacketCreator.updateMount(owner.getId(), this, false));
if (tiredness > 99) {
this.tiredness = 99;
owner.dispelSkill(owner.getJobType() * 10000000 + 1004);
}
} else {
if(this.tirednessSchedule != null) {
this.tirednessSchedule.cancel(false);
}
}
if(owner != null) {
this.tiredness++;
owner.getMap().broadcastMessage(MaplePacketCreator.updateMount(owner.getId(), this, false));
if (tiredness > 99) {
this.tiredness = 99;
owner.dispelSkill(owner.getJobType() * 10000000 + 1004);
owner.dropMessage("Your mount grew tired! Treat it some revitalizer before riding it again!");
}
} else {
if(this.tirednessSchedule != null) {
this.tirednessSchedule.cancel(false);
}
}
}
public void setExp(int newexp) {