From 8b7ac68f8a26438b1495dbded2e1095823165286 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Tue, 28 Mar 2023 17:10:27 -0400 Subject: [PATCH] v2.0.1: added a safety check to unbundling the unstable spellbook --- .../items/artifacts/UnstableSpellbook.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/UnstableSpellbook.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/UnstableSpellbook.java index fd16f7293..885fe5244 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/UnstableSpellbook.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/UnstableSpellbook.java @@ -282,7 +282,9 @@ public class UnstableSpellbook extends Artifact { public void restoreFromBundle( Bundle bundle ) { super.restoreFromBundle(bundle); scrolls.clear(); - Collections.addAll(scrolls, bundle.getClassArray(SCROLLS)); + if (bundle.contains(SCROLLS)) { + Collections.addAll(scrolls, bundle.getClassArray(SCROLLS)); + } } public class bookRecharge extends ArtifactBuff{