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

@@ -26,6 +26,7 @@ import client.inventory.MapleInventoryType;
/**
*
* @author Jay Estrella
* @author Ronan
*/
public final class ItemConstants {
public final static int LOCK = 0x01;
@@ -89,6 +90,45 @@ public final class ItemConstants {
public static boolean isPet(int itemId) {
return itemId / 1000 == 5000;
}
public static boolean isTownScroll(int itemId) {
return itemId >= 2030000 && itemId < 2030021;
}
public static boolean isAntibanishScroll(int itemId) {
return itemId == 2030100;
}
public static boolean isCleanSlate(int scrollId) {
return scrollId > 2048999 && scrollId < 2049004;
}
public static boolean isFlagModifier(int scrollId, byte flag) {
if(scrollId == 2041058 && ((flag & ItemConstants.COLD) == ItemConstants.COLD)) return true;
if(scrollId == 2040727 && ((flag & ItemConstants.SPIKES) == ItemConstants.SPIKES)) return true;
return false;
}
public static boolean isChaosScroll(int scrollId) {
return scrollId >= 2049100 && scrollId <= 2049103;
}
public static boolean isRateCoupon(int itemId) {
int itemType = itemId / 1000;
return itemType == 5211 || itemType == 5360;
}
public static boolean isExpCoupon(int couponId) {
return couponId / 1000 == 5211;
}
public static boolean isPartyItem(int itemId) {
return itemId >= 2022430 && itemId <= 2022433;
}
public static boolean isPartyAllcure(int itemId) {
return itemId == 2022433;
}
public static MapleInventoryType getInventoryType(final int itemId) {
final byte type = (byte) (itemId / 1000000);

View File

@@ -4,6 +4,11 @@ import java.io.FileInputStream;
import java.util.Properties;
public class ServerConstants {
//Database Configuration
public static String DB_URL = "";
public static String DB_USER = "";
public static String DB_PASS = "";
public static final short DB_EXPERIMENTAL_POOLS = 4; //[EXPERIMENTAL] Installs a set number of database drivers/pools to hub connections. Set 0 to default.
//World And Version
public static short VERSION = 83;
@@ -21,11 +26,6 @@ public class ServerConstants {
//Ip Configuration
public static String HOST;
//Database Configuration
public static String DB_URL = "";
public static String DB_USER = "";
public static String DB_PASS = "";
//Other Configuration
public static boolean JAVA_8;
public static boolean SHUTDOWNHOOK;
@@ -59,7 +59,7 @@ public class ServerConstants {
//Dangling Items Configuration
public static final int ITEM_EXPIRE_TIME = 3 * 60 * 1000; //Time before items start disappearing. Recommended to be set up to 3 minutes.
public static final int ITEM_MONITOR_TIME = 5 * 60 * 1000; //Interval between item monitoring task on maps, which checks for dangling item objects on the map item history.
public static final int ITEM_LIMIT_ON_MAP = 777; //Max number of items allowed on a map.
public static final int ITEM_LIMIT_ON_MAP = 250; //Max number of items allowed on a map.
//Some Gameplay Enhancing Configuration
public static final boolean USE_PERFECT_SCROLLING = true; //Scrolls doesn't use slots upon failure.