From 846a6f34eb1564c8645a65f817b791059790ccb9 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Mon, 28 Sep 2020 01:18:25 -0400 Subject: [PATCH] v0.9.0: fixed HP errors when game is loaded while hero is degraded --- .../shatteredpixeldungeon/actors/hero/Hero.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java index 915a5671d..7ccfbd66a 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java @@ -256,6 +256,12 @@ public class Hero extends Char { @Override public void restoreFromBundle( Bundle bundle ) { + + lvl = bundle.getInt( LEVEL ); + exp = bundle.getInt( EXPERIENCE ); + + HTBoost = bundle.getInt(HTBOOST); + super.restoreFromBundle( bundle ); heroClass = HeroClass.restoreInBundle( bundle ); @@ -266,12 +272,7 @@ public class Hero extends Char { defenseSkill = bundle.getInt( DEFENSE ); STR = bundle.getInt( STRENGTH ); - - lvl = bundle.getInt( LEVEL ); - exp = bundle.getInt( EXPERIENCE ); - - HTBoost = bundle.getInt(HTBOOST); - + belongings.restoreFromBundle( bundle ); }