diff --git a/src/engine/objects/Warehouse.java b/src/engine/objects/Warehouse.java index 8a0dc65a..a11fe524 100644 --- a/src/engine/objects/Warehouse.java +++ b/src/engine/objects/Warehouse.java @@ -179,12 +179,12 @@ public class Warehouse extends AbstractWorldObject { boolean worked; EnumBitSet bitSet = EnumBitSet.asEnumBitSet(wh.lockedResourceTypes.toLong(), Enum.ResourceType.class); - bitSet.remove(Enum.ResourceType.resourceLookup.get(ItemBase.getItemBase(resourceType.templateID))); + bitSet.remove(resourceType); worked = DbManager.WarehouseQueries.updateLocks(wh, bitSet.toLong()); if (worked) { - wh.lockedResourceTypes.remove(Enum.ResourceType.resourceLookup.get(ItemBase.getItemBase(resourceType.templateID))); + wh.lockedResourceTypes.remove(resourceType); ViewResourcesMessage vrm = new ViewResourcesMessage(player); vrm.setGuild(player.getGuild()); vrm.setWarehouseBuilding(warehouse); @@ -197,12 +197,12 @@ public class Warehouse extends AbstractWorldObject { EnumBitSet bitSet = EnumBitSet.asEnumBitSet(wh.lockedResourceTypes.toLong(), Enum.ResourceType.class); - bitSet.add(Enum.ResourceType.resourceLookup.get(ItemBase.getItemBase(resourceType.templateID))); + bitSet.add(resourceType); if (!DbManager.WarehouseQueries.updateLocks(wh, bitSet.toLong())) return; - wh.lockedResourceTypes.add(Enum.ResourceType.resourceLookup.get(ItemBase.getItemBase(resourceType.templateID))); + wh.lockedResourceTypes.add(resourceType); ViewResourcesMessage vrm = new ViewResourcesMessage(player); vrm.setGuild(player.getGuild()); vrm.setWarehouseBuilding(warehouse);