From 0a3624e503a9e553f6d0f5f097a2c1611066af15 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sat, 18 May 2024 00:24:41 -0500 Subject: [PATCH] 5 second delay for switching boxes --- src/engine/net/client/msg/VendorDialogMsg.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/engine/net/client/msg/VendorDialogMsg.java b/src/engine/net/client/msg/VendorDialogMsg.java index 25442367..4e11b41a 100644 --- a/src/engine/net/client/msg/VendorDialogMsg.java +++ b/src/engine/net/client/msg/VendorDialogMsg.java @@ -141,6 +141,12 @@ public class VendorDialogMsg extends ClientNetMsg { ChatManager.chatSystemInfo(playerCharacter, "You Are Already The Active Character."); return; } + + if(playerCharacter.getTimestamps().containsKey("BoxChange") && playerCharacter.getTimeStamp("BoxChange") + 5000 > System.currentTimeMillis()) { + ChatManager.chatSystemInfo(playerCharacter, "You Are Enrolling Too Often."); + return; + } + playerCharacter.getTimestamps().put("BoxChange",System.currentTimeMillis()); playerCharacter.isBoxed = false; playerCharacter.removeEffectBySource(Enum.EffectSourceType.DeathShroud,50,true); ChatManager.chatSystemInfo(playerCharacter, "Promoting To Active Duty");