Fix crash when levelling up

This commit is contained in:
Sollace 2022-09-02 10:36:47 +02:00
parent d9933bb3ec
commit 8fe3e9ec62

View file

@ -89,8 +89,8 @@ public class ManaContainer implements MagicReserves, Tickable {
if (pony.getLevel().canLevelUp()) { if (pony.getLevel().canLevelUp()) {
xp.add(diff / (float)Math.pow(1000, 1 + pony.getLevel().get())); xp.add(diff / (float)Math.pow(1000, 1 + pony.getLevel().get()));
if (xp.getPercentFill() >= 1) { if (xp.getPercentFill() >= 1) {
pony.getLevel().add(1);
xp.set(0); xp.set(0);
pony.getLevel().add(1);
} }
} }