Browse Source

Unused method removed

combat-2
MagicBot 7 months ago
parent
commit
e79fd0c3b4
  1. 28
      src/engine/objects/Warehouse.java

28
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<mbEnums.ResourceType> realmResources, float taxPercent) { public static synchronized void transferResources(Warehouse warehouse, PlayerCharacter taxer, TaxResourcesMsg msg, ArrayList<mbEnums.ResourceType> realmResources, float taxPercent) {
for (mbEnums.ResourceType resourceType : realmResources) { for (mbEnums.ResourceType resourceType : realmResources) {

Loading…
Cancel
Save