From b113b5570323e7fee5c7880d32fdaebe865a211b Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sat, 18 May 2024 11:50:06 -0500 Subject: [PATCH] optimisation --- src/engine/objects/PlayerCharacter.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/engine/objects/PlayerCharacter.java b/src/engine/objects/PlayerCharacter.java index db45630b..77be3db5 100644 --- a/src/engine/objects/PlayerCharacter.java +++ b/src/engine/objects/PlayerCharacter.java @@ -4865,7 +4865,7 @@ public class PlayerCharacter extends AbstractCharacter { ItemFactory.fillInventory(this, 980066, 1); } } - if(!this.isBoxed) { + if(!this.isBoxed && System.currentTimeMillis() < this.nextBoxCheck) { checkIfBoxed(this); } if(this.isBoxed) { @@ -4876,9 +4876,9 @@ public class PlayerCharacter extends AbstractCharacter { if (!this.containsEffect(1672601862)) {//Deathshroud PowersManager.applyPower(this, this, Vector3fImmutable.ZERO, 1672601862, 40, false); - } - if(!this.getEffects().containsKey("MoveBuff")){ - PowersManager.applyPower(this, this, this.loc, 1514898036, 40, false); + if(!this.getEffects().containsKey("MoveBuff")){ + PowersManager.applyPower(this, this, this.loc, 1514898036, 40, false); + } } }else{ if(!this.title.equals(CharacterTitle.NONE)) { @@ -4897,8 +4897,6 @@ public class PlayerCharacter extends AbstractCharacter { } public static void checkIfBoxed(PlayerCharacter player){ - if(System.currentTimeMillis() < player.nextBoxCheck) - return; player.nextBoxCheck = System.currentTimeMillis() + 10000; try {