From 509f10a12c6af64e3a967163549821bd1127f077 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Wed, 19 Oct 2016 18:34:53 -0400 Subject: [PATCH] v0.4.3a: stopped the game attempting to load items dropped into pits that didn't exist --- .../com/shatteredpixel/shatteredpixeldungeon/Dungeon.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java index 470169551..049146032 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java @@ -614,9 +614,10 @@ public class Dungeon { droppedItems = new SparseArray>(); for (int i=2; i <= Statistics.deepestFloor + 1; i++) { ArrayList dropped = new ArrayList(); - for (Bundlable b : bundle.getCollection( Messages.format( DROPPED, i ) ) ) { - dropped.add( (Item)b ); - } + if (bundle.contains(Messages.format( DROPPED, i ))) + for (Bundlable b : bundle.getCollection( Messages.format( DROPPED, i ) ) ) { + dropped.add( (Item)b ); + } if (!dropped.isEmpty()) { droppedItems.put( i, dropped ); }