Refactor to remove abstraction

This commit is contained in:
2023-05-22 05:11:55 -04:00
parent 1cd4617c69
commit 135f66e46f
2 changed files with 188 additions and 90 deletions
@@ -40,7 +40,7 @@ public class dbBuildingHandler extends dbHandlerBase {
ProtectionState protectionState, int currentGold, int rank,
DateTime upgradeDate, int blueprintUUID, float w, float rotY) {
Building toCreate = null;
Building building = null;
try (Connection connection = DbManager.getConnection();
PreparedStatement preparedStatement = connection.prepareStatement("CALL `building_CREATE`(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ,? ,? ,?, ?);")) {
@@ -72,13 +72,13 @@ public class dbBuildingHandler extends dbHandlerBase {
int objectUUID = (int) rs.getLong("UID");
if (objectUUID > 0)
toCreate = GET_BUILDINGBYUUID(objectUUID);
building = GET_BUILDINGBYUUID(objectUUID);
} catch (SQLException e) {
throw new RuntimeException(e);
}
return toCreate;
return building;
}
public boolean DELETE_FROM_DATABASE(final Building b) {