Experimental DB pool + fixed stat overflow on equips

Implemented EXPERIMENTAL DBCP (connection pool), trying to improve
concorrent access to DB. Added door portals on Kerning Square. Fixed
equipments getting stat overflow when upgrading stats. Fixed expiring
pets crashing the client in some cases.
This commit is contained in:
ronancpl
2017-08-23 18:01:17 -03:00
parent 36db21bf80
commit 6628e3db54
190 changed files with 18265 additions and 2183 deletions

View File

@@ -25,6 +25,7 @@ import client.MapleClient;
import client.MapleDisease;
import client.inventory.Item;
import client.inventory.MapleInventoryType;
import constants.ItemConstants;
import net.AbstractMaplePacketHandler;
import server.MapleInventoryManipulator;
import server.MapleItemInformationProvider;
@@ -66,13 +67,13 @@ public final class UseItemHandler extends AbstractMaplePacketHandler {
remove(c, slot);
return;
}
else if (isTownScroll(itemId)) {
else if (ItemConstants.isTownScroll(itemId)) {
if (ii.getItemEffect(toUse.getItemId()).applyTo(c.getPlayer())) {
remove(c, slot);
}
return;
}
else if (isAntibanishScroll(itemId)) {
else if (ItemConstants.isAntibanishScroll(itemId)) {
if (ii.getItemEffect(toUse.getItemId()).applyTo(c.getPlayer())) {
remove(c, slot);
} else {
@@ -92,12 +93,4 @@ public final class UseItemHandler extends AbstractMaplePacketHandler {
MapleInventoryManipulator.removeFromSlot(c, MapleInventoryType.USE, slot, (short) 1, false);
c.announce(MaplePacketCreator.enableActions());
}
private static boolean isTownScroll(int itemId) {
return itemId >= 2030000 && itemId < 2030021;
}
private static boolean isAntibanishScroll(int itemId) {
return itemId == 2030100;
}
}