From a1dbb42b4d83a60b458462d348654164fb01d778 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Fri, 15 Mar 2024 10:50:07 -0400 Subject: [PATCH] More refactor itembase out of warehouse --- src/engine/objects/Warehouse.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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);