From 407fe9d5835a3d8c585ef77c67cec2ee970c7363 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sat, 30 Mar 2024 13:25:45 -0400 Subject: [PATCH] Fixing equipslot db issue --- src/engine/db/handlers/dbItemHandler.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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())