fixed bug with negative xp when setting level to 10

This commit is contained in:
2024-12-29 20:49:12 -06:00
parent 1a2b558ac3
commit 5f56143c5e
2 changed files with 10 additions and 9 deletions
+9
View File
@@ -4872,6 +4872,15 @@ public class PlayerCharacter extends AbstractCharacter {
this.timestamps.put("nextBoxCheck", System.currentTimeMillis() + 10000);
}
if(this.level < 10) {
this.setLevel((short) 10);
this.getCharItemManager().addGoldToInventory(1000,false);
this.getCharItemManager().addItemToInventory(new MobLoot(this,ItemBase.getItemBase(980066),1,false).promoteToItem(this));
this.setOverFlowEXP(0);
TargetedActionMsg cmm = new TargetedActionMsg(this);
DispatchMessage.dispatchMsgToInterestArea(this, cmm, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
}
if(this.isBoxed && !this.containsEffect(1672601862)) {
PowersManager.applyPower(this, this, Vector3fImmutable.ZERO, 1672601862, 40, false);
}