Fixes for /mob, /npc, and /equipset commands.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user