From ee5c254de44fd6b8c3a4bb629e8895d0c4b3a66e Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Thu, 9 May 2024 21:00:27 -0500 Subject: [PATCH] box check --- src/engine/InterestManagement/InterestManager.java | 10 +--------- src/engine/objects/PlayerCharacter.java | 10 ++++------ 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/src/engine/InterestManagement/InterestManager.java b/src/engine/InterestManagement/InterestManager.java index a36c4a3b..e9be2587 100644 --- a/src/engine/InterestManagement/InterestManager.java +++ b/src/engine/InterestManagement/InterestManager.java @@ -530,15 +530,7 @@ public enum InterestManager implements Runnable { player.setDirtyLoad(true); updateStaticList(player, origin); updateMobileList(player, origin); - - //if(player.level < 10) { - //player.setLevel((short) 10); - //MobLoot conc = new MobLoot(player,ItemBase.getItemBase(980066),false); - //player.getCharItemManager().addItemToInventory(conc); - //player.getCharItemManager().addItemToInventory(conc.promoteToItem(player),1); - //player.getCharItemManager().updateInventory(); - // } - player.isBoxed = false; + player.isBoxed = PlayerCharacter.checkIfBoxed(player); } diff --git a/src/engine/objects/PlayerCharacter.java b/src/engine/objects/PlayerCharacter.java index b8d745f7..6930d01e 100644 --- a/src/engine/objects/PlayerCharacter.java +++ b/src/engine/objects/PlayerCharacter.java @@ -4844,9 +4844,6 @@ public class PlayerCharacter extends AbstractCharacter { ItemFactory.fillInventory(this, 980066, 1); } } - if(this.isBoxed == false){ - this. isBoxed = checkIfBoxed(this); - } if(this.isBoxed && this.containsEffect(1672601862) == false) {//Deathshroud PowersManager.applyPower(this, this, Vector3fImmutable.ZERO, 1672601862, 40, false); @@ -4864,15 +4861,16 @@ public class PlayerCharacter extends AbstractCharacter { public static boolean checkIfBoxed(PlayerCharacter player){ try { for (PlayerCharacter pc : SessionManager.getAllActivePlayers()) { + if(pc.getClientConnection().machineID.equals(player.getClientConnection().machineID) == false) + continue; if (!pc.isActive) continue; if (!pc.enteredWorld) continue; if (pc.equals(player)) continue; - if (pc.getClientConnection().machineID.equals(player.getClientConnection().machineID)) - if (pc.isBoxed == false) - return true; + if (pc.isBoxed == false) + return true; } return false;