Fixed bug #771 that made people die when changing class under some conditions.

This commit is contained in:
Ka0rX 2023-04-02 18:13:05 +01:00
parent 739f958d5a
commit 253e2c38e0

View File

@ -300,6 +300,8 @@ public class SavedClassInformation {
player.setMana(mana);
player.setStellium(stellium);
player.setStamina(stamina);
double health=this.health;
health = health == 0 ? 20 : health;
player.getPlayer().setHealth(Math.min(health,player.getPlayer().getAttribute(Attribute.GENERIC_MAX_HEALTH).getValue()));
// Updates level on exp bar
player.refreshVanillaExp();