Key MobBase on its ID and stop reading loadID
Every static_npc_mobbase row has ID = loadID since 3.6 dropped the server-made rows, so the race rune and rune effects are looked up by ID and the loaders no longer filter on loadID. No value change (dev: 2375 of 2375 rows have ID = loadID). Mob.loadID and NPC.loadID are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7027000ba1
commit
236bddc93b
5 files changed
+10
-18
No files matched your search
@@ -39,7 +39,7 @@ public class dbMobBaseHandler extends dbHandlerBase {
|
||||
return mobBase;
|
||||
|
||||
try (Connection connection = DbManager.getConnection();
|
||||
PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM `static_npc_mobbase` WHERE `ID`=? AND `ID` = `loadID`")) {
|
||||
PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM `static_npc_mobbase` WHERE `ID`=?")) {
|
||||
|
||||
preparedStatement.setInt(1, id);
|
||||
|
||||
@@ -58,10 +58,8 @@ public class dbMobBaseHandler extends dbHandlerBase {
|
||||
|
||||
ArrayList<MobBase> mobbaseList = new ArrayList<>();
|
||||
|
||||
// ID <> loadID rows were junk server-made mobbases (15000-17266); skip them on databases that still have them.
|
||||
|
||||
try (Connection connection = DbManager.getConnection();
|
||||
PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM `static_npc_mobbase` WHERE `ID` = `loadID`;")) {
|
||||
PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM `static_npc_mobbase`;")) {
|
||||
|
||||
ResultSet rs = preparedStatement.executeQuery();
|
||||
mobbaseList = getObjectsFromRs(rs, 1000);
|
||||
|
||||
Reference in new issue
Block a user