forked from Upstream/mmocore
Fixed bug #771 that made people die when changing class under some conditions.
This commit is contained in:
parent
739f958d5a
commit
253e2c38e0
@ -300,6 +300,8 @@ public class SavedClassInformation {
|
|||||||
player.setMana(mana);
|
player.setMana(mana);
|
||||||
player.setStellium(stellium);
|
player.setStellium(stellium);
|
||||||
player.setStamina(stamina);
|
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()));
|
player.getPlayer().setHealth(Math.min(health,player.getPlayer().getAttribute(Attribute.GENERIC_MAX_HEALTH).getValue()));
|
||||||
// Updates level on exp bar
|
// Updates level on exp bar
|
||||||
player.refreshVanillaExp();
|
player.refreshVanillaExp();
|
||||||
|
Loading…
Reference in New Issue
Block a user