From e414304e945f226878e8789f12a492fe2975f88b Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Wed, 14 Feb 2024 13:35:10 -0600 Subject: [PATCH] boxshroud fixes --- .../InterestManagement/InterestManager.java | 9 --------- src/engine/objects/PlayerCharacter.java | 17 ++++++++++++++++- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/engine/InterestManagement/InterestManager.java b/src/engine/InterestManagement/InterestManager.java index e49c2d8e..bd27652f 100644 --- a/src/engine/InterestManagement/InterestManager.java +++ b/src/engine/InterestManagement/InterestManager.java @@ -538,15 +538,6 @@ public enum InterestManager implements Runnable { player.getCharItemManager().addGoldToInventory(50000, true); } player.isBoxed = false; - for (String name : player.effects.keySet()) { - Effect eff = player.effects.get(name); - if (eff == null) { - return; - } - //remove deathshroud here! - if (eff.getEffectToken() == 1672601862) - player.effects.remove(name); - } for(PlayerCharacter pc : SessionManager.getAllActivePlayers()){ if(pc.isActive() == false) continue; diff --git a/src/engine/objects/PlayerCharacter.java b/src/engine/objects/PlayerCharacter.java index 7f1f2b56..ddaee7c9 100644 --- a/src/engine/objects/PlayerCharacter.java +++ b/src/engine/objects/PlayerCharacter.java @@ -4814,7 +4814,22 @@ public class PlayerCharacter extends AbstractCharacter { this.safeZone = this.isInSafeZone(); - if(this.isBoxed == true && this.containsEffect(1672601862) == false) + if(this.isBoxed && this.containsEffect(1672601862) == false) + this.isBoxed = false; + for(PlayerCharacter pc : SessionManager.getAllActivePlayers()){ + if(pc.isActive() == false) + continue; + if(pc.isEnteredWorld() == false) + continue; + if(this.getClientConnection().machineID.equals(pc.getClientConnection().machineID)){ + //add deatshroud effect + if(pc.isBoxed == true) + continue; + this.isBoxed = true; + return; + } + } + if(this.isBoxed) PowersManager.applyPower(this, this, Vector3fImmutable.ZERO, 1672601862, 40, false); } catch (Exception e) {