Browse Source

Fixing equipslot db issue

combat-2
MagicBot 8 months ago
parent
commit
407fe9d583
  1. 9
      src/engine/db/handlers/dbItemHandler.java

9
src/engine/db/handlers/dbItemHandler.java

@ -92,6 +92,9 @@ public class dbItemHandler extends dbHandlerBase {
break; break;
} }
if (toAdd.equipSlot.equals(Enum.EquipSlotType.NONE))
preparedStatement.setString(7, "");
else
preparedStatement.setString(7, toAdd.equipSlot.name()); preparedStatement.setString(7, toAdd.equipSlot.name());
String flagString = ""; String flagString = "";
@ -396,7 +399,11 @@ public class dbItemHandler extends dbHandlerBase {
preparedStatement.setString(3, "none"); //Shouldn't be here preparedStatement.setString(3, "none"); //Shouldn't be here
break; 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(); ResultSet rs = preparedStatement.executeQuery();
if (rs.next()) if (rs.next())

Loading…
Cancel
Save