diff --git a/src/engine/db/handlers/dbItemHandler.java b/src/engine/db/handlers/dbItemHandler.java index 73b9cb76..a7e2654b 100644 --- a/src/engine/db/handlers/dbItemHandler.java +++ b/src/engine/db/handlers/dbItemHandler.java @@ -92,7 +92,10 @@ public class dbItemHandler extends dbHandlerBase { break; } - preparedStatement.setString(7, toAdd.equipSlot.name()); + if (toAdd.equipSlot.equals(Enum.EquipSlotType.NONE)) + preparedStatement.setString(7, ""); + else + preparedStatement.setString(7, toAdd.equipSlot.name()); String flagString = ""; @@ -396,7 +399,11 @@ public class dbItemHandler extends dbHandlerBase { preparedStatement.setString(3, "none"); //Shouldn't be here break; } - preparedStatement.setInt(4, slot); + if (item.equipSlot.equals(Enum.EquipSlotType.NONE)) + preparedStatement.setString(4, ""); + else + preparedStatement.setString(4, item.equipSlot.name()); + ResultSet rs = preparedStatement.executeQuery(); if (rs.next())