5 second delay forced between warehouse transactions

This commit is contained in:
2024-05-15 16:46:00 -05:00
parent 39f7be99b0
commit d610bccdee
+10 -2
View File
@@ -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;