From 724ffbb85bfb91ee421a2c66ecd11143a46ea8b5 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Mon, 30 Aug 2021 19:19:13 -0400 Subject: [PATCH] v1.0.3: fixed some aspects of lost inventory being lost on save/load --- .../actors/hero/Belongings.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Belongings.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Belongings.java index bc44dcdff..68b00e267 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Belongings.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Belongings.java @@ -152,13 +152,13 @@ public class Belongings implements Iterable { backpack.restoreFromBundle( bundle ); weapon = (KindOfWeapon) bundle.get(WEAPON); - if (weapon != null) { - weapon.activate(owner); + if (weapon() != null) { + weapon().activate(owner); } armor = (Armor)bundle.get( ARMOR ); - if (armor != null){ - armor.activate( owner ); + if (armor() != null){ + armor().activate( owner ); } //pre-0.8.2 @@ -189,9 +189,9 @@ public class Belongings implements Iterable { ring = (Ring) bundle.get(RING); } - if (artifact != null) artifact.activate(owner); - if (misc != null) misc.activate( owner ); - if (ring != null) ring.activate( owner ); + if (artifact() != null) artifact().activate(owner); + if (misc() != null) misc().activate( owner ); + if (ring() != null) ring().activate( owner ); } public static void preview( GamesInProgress.Info info, Bundle bundle ) {