Browse Source

attempt to stop second box crash

lakebane-dungeon
FatBoy-DOTC 4 days ago
parent
commit
846d720c2f
  1. 28
      src/engine/objects/PlayerCharacter.java

28
src/engine/objects/PlayerCharacter.java

@ -5180,24 +5180,26 @@ public class PlayerCharacter extends AbstractCharacter {
this.updateBlessingMessage(); this.updateBlessingMessage();
this.safeZone = this.isInSafeZone(); this.safeZone = this.isInSafeZone();
if (!this.timestamps.containsKey("nextBoxCheck"))
this.timestamps.put("nextBoxCheck", System.currentTimeMillis() + 10000);
if (!this.isBoxed && this.timestamps.get("nextBoxCheck") < System.currentTimeMillis()) { if(this.isActive && this.enteredWorld) {
this.isBoxed = checkIfBoxed(this); if (!this.timestamps.containsKey("nextBoxCheck"))
this.timestamps.put("nextBoxCheck", System.currentTimeMillis() + 10000); this.timestamps.put("nextBoxCheck", System.currentTimeMillis() + 10000);
}
if (this.level < 10 && this.enteredWorld) { if (!this.isBoxed && this.timestamps.get("nextBoxCheck") < System.currentTimeMillis()) {
while (this.level < 10) { this.isBoxed = checkIfBoxed(this);
grantXP(Experience.getBaseExperience(this.level + 1) - this.exp); this.timestamps.put("nextBoxCheck", System.currentTimeMillis() + 10000);
} }
}
if (this.isBoxed && !this.containsEffect(1672601862)) { if (this.level < 10 && this.enteredWorld) {
PowersManager.applyPower(this, this, Vector3fImmutable.ZERO, 1672601862, 40, false); while (this.level < 10) {
} grantXP(Experience.getBaseExperience(this.level + 1) - this.exp);
}
}
if (this.isBoxed && !this.containsEffect(1672601862)) {
PowersManager.applyPower(this, this, Vector3fImmutable.ZERO, 1672601862, 40, false);
}
}
if (this.isFlying()) { if (this.isFlying()) {
if (this.effects.containsKey("MoveBuff")) { if (this.effects.containsKey("MoveBuff")) {
GroundPlayer(this); GroundPlayer(this);

Loading…
Cancel
Save