optimisation

This commit is contained in:
2024-05-18 11:50:06 -05:00
parent 560466e3ef
commit b113b55703
+4 -6
View File
@@ -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 {