v2.0.1: added a safety check to unbundling the unstable spellbook

This commit is contained in:
Evan Debenham
2023-03-28 17:10:27 -04:00
parent 96f840932c
commit 8b7ac68f8a

View File

@@ -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{