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
@@ -282,8 +282,10 @@ public class UnstableSpellbook extends Artifact {
public void restoreFromBundle( Bundle bundle ) { public void restoreFromBundle( Bundle bundle ) {
super.restoreFromBundle(bundle); super.restoreFromBundle(bundle);
scrolls.clear(); scrolls.clear();
if (bundle.contains(SCROLLS)) {
Collections.addAll(scrolls, bundle.getClassArray(SCROLLS)); Collections.addAll(scrolls, bundle.getClassArray(SCROLLS));
} }
}
public class bookRecharge extends ArtifactBuff{ public class bookRecharge extends ArtifactBuff{
@Override @Override