From c608e09c18e166e4bf8e1aec3598a9156d560d73 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Thu, 2 Jun 2022 12:23:15 -0400 Subject: [PATCH] v1.3.0: fixed a save/load error in spectral necromancers --- .../actors/mobs/SpectralNecromancer.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/SpectralNecromancer.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/SpectralNecromancer.java index 89ba622e7..d57ade752 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/SpectralNecromancer.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/SpectralNecromancer.java @@ -97,7 +97,10 @@ public class SpectralNecromancer extends Necromancer { @Override public void restoreFromBundle(Bundle bundle) { super.restoreFromBundle(bundle); - Collections.addAll(wraithIDs, bundle.getInt(WRAITH_IDS)); + wraithIDs.clear(); + for (int i : bundle.getIntArray(WRAITH_IDS)){ + wraithIDs.add(i); + } } @Override