From 42dd2b4e688a0388673e1eb765d7eca0a3b94309 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 28 Apr 2024 22:33:18 -0500 Subject: [PATCH] swap active character with NPC --- .../net/client/msg/VendorDialogMsg.java | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/engine/net/client/msg/VendorDialogMsg.java b/src/engine/net/client/msg/VendorDialogMsg.java index db0f1c98..4dbebf98 100644 --- a/src/engine/net/client/msg/VendorDialogMsg.java +++ b/src/engine/net/client/msg/VendorDialogMsg.java @@ -9,13 +9,11 @@ package engine.net.client.msg; +import engine.Enum; import engine.Enum.DispatchChannel; import engine.Enum.GuildHistoryType; import engine.exception.MsgSendException; -import engine.gameManager.BuildingManager; -import engine.gameManager.DbManager; -import engine.gameManager.GuildManager; -import engine.gameManager.SessionManager; +import engine.gameManager.*; import engine.math.Vector3fImmutable; import engine.net.*; import engine.net.client.ClientConnection; @@ -137,6 +135,19 @@ public class VendorDialogMsg extends ClientNetMsg { msg.updateMessage(3, vd); } + if(contract.getObjectUUID() == 1502040){ + ChatManager.chatSystemInfo(playerCharacter, "Promoting To Active Duty"); + ArrayList currentBoxes = new ArrayList<>(); + for(PlayerCharacter pc : SessionManager.getAllActivePlayerCharacters()){ + if(pc.getClientConnection().machineID.equals(playerCharacter.getClientConnection().machineID) && pc.equals(playerCharacter) == false) + currentBoxes.add(pc); + } + playerCharacter.isBoxed = false; + playerCharacter.clearEffects(); + playerCharacter.removeEffectBySource(Enum.EffectSourceType.DeathShroud,50,true); + for(PlayerCharacter box : currentBoxes) + box.isBoxed = true; + } Dispatch dispatch = Dispatch.borrow(playerCharacter, msg); DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);