forked from MagicBane/Server
Added ./setrace command
This commit is contained in:
@@ -309,7 +309,21 @@ public class dbNPCHandler extends dbHandlerBase {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
public boolean UPDATE_RACE(NPC npc, int value) {
|
||||
|
||||
try (Connection connection = DbManager.getConnection();
|
||||
PreparedStatement preparedStatement = connection.prepareStatement("UPDATE `obj_npc` SET `npc_raceID`=? WHERE `UID`=?")) {
|
||||
|
||||
preparedStatement.setInt(1, value);
|
||||
preparedStatement.setLong(2, npc.getObjectUUID());
|
||||
|
||||
return (preparedStatement.executeUpdate() > 0);
|
||||
|
||||
} catch (SQLException e) {
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
public void LOAD_PIRATE_NAMES() {
|
||||
|
||||
String pirateName;
|
||||
|
||||
Reference in New Issue
Block a user