From 4f4ff74bf1482351c527058d4addb54806d50d59 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 29 Dec 2024 19:32:01 -0600 Subject: [PATCH] fixed bug with negative xp when setting level to 10 --- src/engine/objects/PlayerCharacter.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/engine/objects/PlayerCharacter.java b/src/engine/objects/PlayerCharacter.java index aafe3a16..06c78806 100644 --- a/src/engine/objects/PlayerCharacter.java +++ b/src/engine/objects/PlayerCharacter.java @@ -2921,6 +2921,10 @@ public class PlayerCharacter extends AbstractCharacter { } public synchronized void grantXP(int xp) { + if(this.promotionClass == null && this.level == 10){ + this.setOverFlowEXP(0); + return; + } // Stop players from getting experience past the cap if (this.exp + xp >= Experience.getBaseExperience(MBServerStatics.LEVELCAP)) xp = Experience.getBaseExperience(MBServerStatics.LEVELCAP) - this.exp + 1;