diff --git a/src/engine/db/handlers/dbRuneBaseAttributeHandler.java b/src/engine/db/handlers/dbRuneBaseAttributeHandler.java index ce880b6a..923385b1 100644 --- a/src/engine/db/handlers/dbRuneBaseAttributeHandler.java +++ b/src/engine/db/handlers/dbRuneBaseAttributeHandler.java @@ -9,8 +9,14 @@ package engine.db.handlers; +import engine.gameManager.DbManager; import engine.objects.RuneBaseAttribute; +import org.pmw.tinylog.Logger; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; import java.util.ArrayList; public class dbRuneBaseAttributeHandler extends dbHandlerBase { @@ -20,15 +26,21 @@ public class dbRuneBaseAttributeHandler extends dbHandlerBase { this.localObjectType = engine.Enum.GameObjectType.valueOf(this.localClass.getSimpleName()); } - public ArrayList GET_ATTRIBUTES_FOR_RUNEBASE(int id) { - prepareCallable("SELECT * FROM `static_rune_runebaseattribute` WHERE `RuneBaseID`=?"); - setInt(1, id); - return getObjectList(); - } - public ArrayList GET_ATTRIBUTES_FOR_RUNEBASE() { - prepareCallable("SELECT * FROM `static_rune_runebaseattribute`"); - return getObjectList(); + + ArrayList runeBaseAttributesList = new ArrayList<>(); + + try (Connection connection = DbManager.getConnection(); + PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM `static_rune_runebaseattribute`")) { + + ResultSet rs = preparedStatement.executeQuery(); + runeBaseAttributesList = getObjectsFromRs(rs, 10); + + } catch (SQLException e) { + Logger.error(e); + } + + return runeBaseAttributesList; }