|
|
@ -345,39 +345,6 @@ public class dbNPCHandler extends dbHandlerBase { |
|
|
|
+ NPC._pirateNames.size() + " mobBases"); |
|
|
|
+ NPC._pirateNames.size() + " mobBases"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public boolean REMOVE_FROM_PRODUCTION_LIST(final long ID, final long npcUID) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try (Connection connection = DbManager.getConnection(); |
|
|
|
|
|
|
|
PreparedStatement preparedStatement = connection.prepareStatement("DELETE FROM `dyn_npc_production` WHERE `ID`=? AND `npcUID`=?;")) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
preparedStatement.setLong(1, ID); |
|
|
|
|
|
|
|
preparedStatement.setLong(2, npcUID); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return (preparedStatement.executeUpdate() > 0); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} catch (SQLException e) { |
|
|
|
|
|
|
|
Logger.error(e); |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public boolean UPDATE_ITEM_PRICE(final long ID, final long npcUID, int value) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try (Connection connection = DbManager.getConnection(); |
|
|
|
|
|
|
|
PreparedStatement preparedStatement = connection.prepareStatement("UPDATE `dyn_npc_production` SET `value`=? WHERE `ID`=? AND `npcUID`=?;")) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
preparedStatement.setInt(1, value); |
|
|
|
|
|
|
|
preparedStatement.setLong(2, ID); |
|
|
|
|
|
|
|
preparedStatement.setLong(3, npcUID); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return (preparedStatement.executeUpdate() > 0); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} catch (SQLException e) { |
|
|
|
|
|
|
|
Logger.error(e); |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public boolean UPDATE_PROFITS(NPC npc, ProfitType profitType, float value) { |
|
|
|
public boolean UPDATE_PROFITS(NPC npc, ProfitType profitType, float value) { |
|
|
|
|
|
|
|
|
|
|
|
try (Connection connection = DbManager.getConnection(); |
|
|
|
try (Connection connection = DbManager.getConnection(); |
|
|
|