Return map & MaplePacketEncoder & Quest status patch

Fixed null pointer issue when trying to use return scroll on maps such as Mu Lung.
Fixed a critical deadlock issue with MaplePacketEncoder.
Fixed a critical DB leak regarding player's quest status.
This commit is contained in:
ronancpl
2018-06-08 13:21:03 -03:00
parent cdac59326a
commit 0b8d3a0b2b
13 changed files with 218 additions and 35 deletions

View File

@@ -1037,26 +1037,26 @@ public class MapleStatEffect {
int seconds = localDuration / 1000;
MapleMount givemount = null;
if (isMonsterRiding()) {
int ridingLevel = 0;
int ridingMountId = 0;
Item mount = applyfrom.getInventory(MapleInventoryType.EQUIPPED).getItem((short) -18);
if (mount != null) {
ridingLevel = mount.getItemId();
ridingMountId = mount.getItemId();
}
if (sourceid == Corsair.BATTLE_SHIP) {
ridingLevel = 1932000;
ridingMountId = 1932000;
} else if (sourceid == Beginner.SPACESHIP || sourceid == Noblesse.SPACESHIP) {
ridingLevel = 1932000 + applyto.getSkillLevel(sourceid);
ridingMountId = 1932000 + applyto.getSkillLevel(sourceid);
} else if (sourceid == Beginner.YETI_MOUNT1 || sourceid == Noblesse.YETI_MOUNT1 || sourceid == Legend.YETI_MOUNT1) {
ridingLevel = 1932003;
ridingMountId = 1932003;
} else if (sourceid == Beginner.YETI_MOUNT2 || sourceid == Noblesse.YETI_MOUNT2 || sourceid == Legend.YETI_MOUNT2) {
ridingLevel = 1932004;
ridingMountId = 1932004;
} else if (sourceid == Beginner.WITCH_BROOMSTICK || sourceid == Noblesse.WITCH_BROOMSTICK || sourceid == Legend.WITCH_BROOMSTICK) {
ridingLevel = 1932005;
ridingMountId = 1932005;
} else if (sourceid == Beginner.BALROG_MOUNT || sourceid == Noblesse.BALROG_MOUNT || sourceid == Legend.BALROG_MOUNT) {
ridingLevel = 1932010;
ridingMountId = 1932010;
} else {
if (applyto.getMount() == null) {
applyto.mount(ridingLevel, sourceid);
applyto.mount(ridingMountId, sourceid);
}
applyto.getClient().getWorldServer().registerMountHunger(applyto);
@@ -1077,7 +1077,7 @@ public class MapleStatEffect {
givemount = applyto.getMount();
}
localDuration = sourceid;
localsourceid = ridingLevel;
localsourceid = ridingMountId;
localstatups = Collections.singletonList(new Pair<>(MapleBuffStat.MONSTER_RIDING, 0));
} else if (isSkillMorph()) {
localstatups = Collections.singletonList(new Pair<>(MapleBuffStat.MORPH, getMorph(applyto)));