From c792e49fdcf726956bf177bf4c2ed3b6ed414a41 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Mon, 20 May 2024 11:14:24 -0500 Subject: [PATCH] added 30 second delay to Enrollment Officer --- src/engine/net/client/msg/VendorDialogMsg.java | 10 ++++++++++ src/engine/objects/PlayerCharacter.java | 2 ++ 2 files changed, 12 insertions(+) diff --git a/src/engine/net/client/msg/VendorDialogMsg.java b/src/engine/net/client/msg/VendorDialogMsg.java index 25442367..49bb8978 100644 --- a/src/engine/net/client/msg/VendorDialogMsg.java +++ b/src/engine/net/client/msg/VendorDialogMsg.java @@ -137,10 +137,20 @@ public class VendorDialogMsg extends ClientNetMsg { } if(contract.getObjectUUID() == 1502040){ + if(!playerCharacter.getTimestamps().containsKey("lastBoxChange")) + playerCharacter.getTimestamps().put("lastBoxChange",System.currentTimeMillis() - 1000); + + if(playerCharacter.getTimeStamp("lastBoxChange") + 30000L > System.currentTimeMillis()) { + return; + } + if(playerCharacter.isBoxed == false) { ChatManager.chatSystemInfo(playerCharacter, "You Are Already The Active Character."); return; } + + playerCharacter.getTimestamps().put("lastBoxChange",System.currentTimeMillis()); + playerCharacter.isBoxed = false; playerCharacter.removeEffectBySource(Enum.EffectSourceType.DeathShroud,50,true); ChatManager.chatSystemInfo(playerCharacter, "Promoting To Active Duty"); diff --git a/src/engine/objects/PlayerCharacter.java b/src/engine/objects/PlayerCharacter.java index f9aff3f3..01bcc626 100644 --- a/src/engine/objects/PlayerCharacter.java +++ b/src/engine/objects/PlayerCharacter.java @@ -177,6 +177,8 @@ public class PlayerCharacter extends AbstractCharacter { public float ZergMultiplier = 1.0f; public int mineAppliedID = 0; + + public long lastBoxChange = System.currentTimeMillis(); /** * No Id Constructor */