diff --git a/src/engine/objects/Warehouse.java b/src/engine/objects/Warehouse.java index fde2ca1d..7bf3061c 100644 --- a/src/engine/objects/Warehouse.java +++ b/src/engine/objects/Warehouse.java @@ -371,34 +371,6 @@ public class Warehouse { } - public static synchronized boolean withdraw(Warehouse warehouse, NPC npc, mbEnums.ResourceType resourceType, int amount, boolean transaction) { - - int oldAmount = warehouse.resources.get(resourceType); - - int newAmount = oldAmount - amount; - - if (warehouse.resources.get(resourceType) == null) - return false; - - if (amount <= 0) - return false; - - if (oldAmount < amount) - return false; - - warehouse.resources.put(resourceType, newAmount); - - if (!DbManager.WarehouseQueries.UPDATE_WAREHOUSE(warehouse)) { - warehouse.resources.put(resourceType, oldAmount); - return false; - } - - if (transaction) - AddTransactionToWarehouse(warehouse, npc.getObjectType(), npc.getObjectUUID(), mbEnums.TransactionType.WITHDRAWL, resourceType, amount); - - return true; - } - public static synchronized void transferResources(Warehouse warehouse, PlayerCharacter taxer, TaxResourcesMsg msg, ArrayList realmResources, float taxPercent) { for (mbEnums.ResourceType resourceType : realmResources) {