ThreadTracker + Attempt on NPC Disappearing fix

Engineered the ThreadTracker: server-embedded deadlock auditing tool, which will print error messages in case of found deadlocks (also showing all in-use locks on the time of the issue).
Changed the player's id on DB now starting from 20mil, thus preventing players from overwriting NPC/mobs with same oid in-game. Requires proper testing to see if the issue has been cleared.
This commit is contained in:
ronancpl
2017-11-16 12:22:32 -02:00
parent aecc3e300a
commit 2b38b62683
50 changed files with 1099 additions and 123 deletions

Binary file not shown.

View File

@@ -1,14 +1,24 @@
Red Potion
Lemon
W. Ramen
Elixir
Mana Elixir
Mushroom Miso Ramen
Power Elixir
Lunar Gloves
LeFay Jester
Eclipse Earrings
Herculean Crown
Lockewood Hat
Pickpocket Pilfer
Eclipse Cloak
Gladius
Niam
Titan
Crescent Polearm
Iron Dagger
White Crusader Chainmail (Male)
Wizard Wand
Wizard Staff
Golden Pride
Blue Guiltian
Red Amorian Skirt (Female)
Red Salt Shoes
Green Pole-Feather Hat
Black Bennis Chainmail (Male)
Red Legolier (Male)
Blue Legolier Pants (Male)
Green Marker
Gold Brace
Green Hunter Boots
Dragon Toenail
Rouge Way
Guardian Katara
Justice Katara
Norman Grip

View File

@@ -0,0 +1,20 @@
1302008
1412004
1422007
1442009
1332010
1372001
1382002
1002013
1002152
1061047
1072090
1002137
1040023
1040072
1060062
1082049
1082072
1072081
1332031
1482003

View File

@@ -1,2 +1,2 @@
compile.on.save=true
user.properties.file=C:\\Users\\USER\\AppData\\Roaming\\NetBeans\\8.0.2\\build.properties
user.properties.file=C:\\Users\\RonanLana\\AppData\\Roaming\\NetBeans\\8.0.2\\build.properties

View File

@@ -41,9 +41,11 @@ import java.util.ArrayList;
* Set whether you are first installing the handbook on the SQL Server (TRUE) or just fetching whatever is on your "fetch.txt"
* file (FALSE) on the INSTALL_SQLTABLE property and build the project. With all done, run the Java executable.
*
* Expected installing time: 30 minutes
*
*/
public class MapleIdRetriever {
private final static boolean INSTALL_SQLTABLE = true;
private final static boolean INSTALL_SQLTABLE = false;
static String host = "jdbc:mysql://localhost:3306/maplesolaxia";
static String driver = "com.mysql.jdbc.Driver";
@@ -83,7 +85,12 @@ public class MapleIdRetriever {
if(tokens.length > 1) {
PreparedStatement ps = con.prepareStatement("INSERT INTO `handbook` (`id`, `name`) VALUES (?, ?)");
ps.setInt(1, Integer.parseInt(tokens[0]));
try {
ps.setInt(1, Integer.parseInt(tokens[0]));
} catch (NumberFormatException npe) { // odd...
String num = tokens[0].substring(1);
ps.setInt(1, Integer.parseInt(num));
}
ps.setString(2, tokens[1]);
ps.execute();
}