diff --git a/src/engine/objects/Warehouse.java b/src/engine/objects/Warehouse.java index bf8ee055..9c17c39f 100644 --- a/src/engine/objects/Warehouse.java +++ b/src/engine/objects/Warehouse.java @@ -129,11 +129,12 @@ public class Warehouse extends AbstractWorldObject { public static void warehouseDeposit(MerchantMsg msg, PlayerCharacter player, NPC npc, ClientConnection origin) { - if(player.lastAction + 5000 > System.currentTimeMillis()){ + long nextAllowedAction = player.lastAction + 5000; + if(nextAllowedAction > System.currentTimeMillis()){ ChatManager.chatSystemInfo(player, "You Must Wait To Do This"); return; } - + player.lastAction = System.currentTimeMillis(); Building warehouseBuilding; Warehouse warehouse; @@ -182,6 +183,13 @@ public class Warehouse extends AbstractWorldObject { public static void warehouseWithdraw(MerchantMsg msg, PlayerCharacter player, NPC npc, ClientConnection origin) { + long nextAllowedAction = player.lastAction + 5000; + if(nextAllowedAction > System.currentTimeMillis()){ + ChatManager.chatSystemInfo(player, "You Must Wait To Do This"); + return; + } + player.lastAction = System.currentTimeMillis(); + int withdrawAmount; Building warehouseBuilding; Warehouse warehouse;