From 8194bd8ef219c516d5af020d7b1726eb6ca69acb Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 16 Mar 2025 00:39:33 -0500 Subject: [PATCH] stop invisible player plague --- src/engine/objects/PlayerCharacter.java | 32 ++++++++++--------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/src/engine/objects/PlayerCharacter.java b/src/engine/objects/PlayerCharacter.java index d2af0b38..811c3641 100644 --- a/src/engine/objects/PlayerCharacter.java +++ b/src/engine/objects/PlayerCharacter.java @@ -5210,27 +5210,25 @@ public class PlayerCharacter extends AbstractCharacter { this.timestamps.put("nextBoxCheck", System.currentTimeMillis() + 10000); } - if (this.level < 10 && this.enteredWorld) { - while (this.level < 10) { - grantXP(Experience.getBaseExperience(this.level + 1) - this.exp); - } - } - if (this.isBoxed){ if(!this.title.equals(CharacterTitle.PVE)){ this.title = CharacterTitle.PVE; - //InterestManager.setObjectDirty(this); - //InterestManager.reloadCharacter(this, false); - LoadCharacterMsg lcm = new LoadCharacterMsg(this, PlayerCharacter.hideNonAscii()); - DispatchMessage.dispatchMsgToInterestArea(this,lcm,DispatchChannel.PRIMARY,MBServerStatics.CHARACTER_LOAD_RANGE,true,false); + InterestManager.setObjectDirty(this); + InterestManager.reloadCharacter(this, false); + this.setDirtyLoad(true); } }else { if (!this.title.equals(CharacterTitle.NONE)) { this.title = CharacterTitle.NONE; - //InterestManager.setObjectDirty(this); - //InterestManager.reloadCharacter(this, false); - LoadCharacterMsg lcm = new LoadCharacterMsg(this, PlayerCharacter.hideNonAscii()); - DispatchMessage.dispatchMsgToInterestArea(this,lcm,DispatchChannel.PRIMARY,MBServerStatics.CHARACTER_LOAD_RANGE,true,false); + InterestManager.setObjectDirty(this); + InterestManager.reloadCharacter(this, false); + this.setDirtyLoad(true); + } + } + + if (this.level < 10 && this.enteredWorld) { + while (this.level < 10) { + grantXP(Experience.getBaseExperience(this.level + 1) - this.exp); } } } @@ -5278,14 +5276,8 @@ public class PlayerCharacter extends AbstractCharacter { if(pc.equals(player)) continue; pc.isBoxed = true; - pc.title = CharacterTitle.PVE; - InterestManager.setObjectDirty(pc); - InterestManager.reloadCharacter(pc, false); } player.isBoxed = false; - player.title = CharacterTitle.NONE; - InterestManager.setObjectDirty(player); - InterestManager.reloadCharacter(player, false); } public static boolean checkIfBoxed(PlayerCharacter player){ if(ConfigManager.MB_WORLD_BOXLIMIT.getValue().equals("false")) {