|
|
@ -179,12 +179,12 @@ public class Warehouse extends AbstractWorldObject { |
|
|
|
boolean worked; |
|
|
|
boolean worked; |
|
|
|
EnumBitSet<Enum.ResourceType> bitSet = EnumBitSet.asEnumBitSet(wh.lockedResourceTypes.toLong(), Enum.ResourceType.class); |
|
|
|
EnumBitSet<Enum.ResourceType> 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()); |
|
|
|
worked = DbManager.WarehouseQueries.updateLocks(wh, bitSet.toLong()); |
|
|
|
|
|
|
|
|
|
|
|
if (worked) { |
|
|
|
if (worked) { |
|
|
|
wh.lockedResourceTypes.remove(Enum.ResourceType.resourceLookup.get(ItemBase.getItemBase(resourceType.templateID))); |
|
|
|
wh.lockedResourceTypes.remove(resourceType); |
|
|
|
ViewResourcesMessage vrm = new ViewResourcesMessage(player); |
|
|
|
ViewResourcesMessage vrm = new ViewResourcesMessage(player); |
|
|
|
vrm.setGuild(player.getGuild()); |
|
|
|
vrm.setGuild(player.getGuild()); |
|
|
|
vrm.setWarehouseBuilding(warehouse); |
|
|
|
vrm.setWarehouseBuilding(warehouse); |
|
|
@ -197,12 +197,12 @@ public class Warehouse extends AbstractWorldObject { |
|
|
|
|
|
|
|
|
|
|
|
EnumBitSet<Enum.ResourceType> bitSet = EnumBitSet.asEnumBitSet(wh.lockedResourceTypes.toLong(), Enum.ResourceType.class); |
|
|
|
EnumBitSet<Enum.ResourceType> 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())) |
|
|
|
if (!DbManager.WarehouseQueries.updateLocks(wh, bitSet.toLong())) |
|
|
|
return; |
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
wh.lockedResourceTypes.add(Enum.ResourceType.resourceLookup.get(ItemBase.getItemBase(resourceType.templateID))); |
|
|
|
wh.lockedResourceTypes.add(resourceType); |
|
|
|
ViewResourcesMessage vrm = new ViewResourcesMessage(player); |
|
|
|
ViewResourcesMessage vrm = new ViewResourcesMessage(player); |
|
|
|
vrm.setGuild(player.getGuild()); |
|
|
|
vrm.setGuild(player.getGuild()); |
|
|
|
vrm.setWarehouseBuilding(warehouse); |
|
|
|
vrm.setWarehouseBuilding(warehouse); |
|
|
|