Equipslot stored as string
This commit is contained in:
@@ -92,7 +92,10 @@ public class dbItemHandler extends dbHandlerBase {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
preparedStatement.setByte(7, (byte) toAdd.equipSlot.ordinal());
|
if (toAdd.equipSlot.equals(Enum.EquipSlotType.NONE))
|
||||||
|
preparedStatement.setString(7, "");
|
||||||
|
else
|
||||||
|
preparedStatement.setString(7, toAdd.equipSlot.name());
|
||||||
|
|
||||||
String flagString = "";
|
String flagString = "";
|
||||||
|
|
||||||
|
|||||||
@@ -147,7 +147,12 @@ public class Item extends AbstractWorldObject {
|
|||||||
|
|
||||||
this.canDestroy = true;
|
this.canDestroy = true;
|
||||||
|
|
||||||
this.equipSlot = EquipSlotType.values()[rs.getByte("equipSlot")];
|
String equipString = rs.getString("equipSlot");
|
||||||
|
|
||||||
|
if (equipString.isEmpty())
|
||||||
|
this.equipSlot = EquipSlotType.NONE;
|
||||||
|
else
|
||||||
|
this.equipSlot = EquipSlotType.valueOf(equipString);
|
||||||
|
|
||||||
this.numberOfItems = rs.getInt("numberOfItems");
|
this.numberOfItems = rs.getInt("numberOfItems");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user