Fixes for /mob, /npc, and /equipset commands.

This commit is contained in:
byronhb
2025-11-10 21:14:28 -06:00
parent 3649c629b7
commit 221ae0a58b
3 changed files with 20 additions and 5 deletions
+6 -2
View File
@@ -243,8 +243,12 @@ public class dbNPCHandler extends dbHandlerBase {
public boolean UPDATE_EQUIPSET(NPC npc, int equipSetID) {
// Column name must match what NPC/Mob loaders read ("equipmentSet").
// Using the wrong column here causes the update to fail silently and
// dev command to report "Unable to find Equipset" despite a valid ID.
try (Connection connection = DbManager.getConnection();
PreparedStatement preparedStatement = connection.prepareStatement("UPDATE `obj_npc` SET `equipsetID`=? WHERE `UID`=?")) {
PreparedStatement preparedStatement = connection.prepareStatement("UPDATE `obj_npc` SET `equipmentSet`=? WHERE `UID`=?")) {
preparedStatement.setInt(1, equipSetID);
preparedStatement.setLong(2, npc.getObjectUUID());
@@ -467,4 +471,4 @@ public class dbNPCHandler extends dbHandlerBase {
return false;
}
}
}
}