From 628f04f58925f289ae08d4b79d3a0bbaa75f58ef Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Thu, 13 Oct 2022 16:45:55 -0400 Subject: [PATCH] v1.4.2: fixed errors with item moving when caves boss arena seals --- .../shatteredpixeldungeon/levels/CavesBossLevel.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/CavesBossLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/CavesBossLevel.java index dedd99ebe..5c041c4f0 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/CavesBossLevel.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/CavesBossLevel.java @@ -272,12 +272,13 @@ public class CavesBossLevel extends Level { set( entrance, Terrain.WALL ); Heap heap = Dungeon.level.heaps.get( entrance ); - if (heap != null) { + while (heap != null && !heap.isEmpty()) { int n; do { - n = entrance + PathFinder.NEIGHBOURS8[Random.Int( 8 )]; + n = entrance + PathFinder.NEIGHBOURS8[Random.Int(8)]; } while (!Dungeon.level.passable[n]); - Dungeon.level.drop( heap.pickUp(), n ).sprite.drop( entrance ); + Heap dropped = Dungeon.level.drop(heap.pickUp(), n); + dropped.seen = heap.seen; } Char ch = Actor.findChar( entrance );