v0.3.2: fixed a concurrent modification exception in distortion traps
This commit is contained in:
parent
5d24147312
commit
69667baafb
|
@ -39,7 +39,7 @@ public class DistortionTrap extends Trap{
|
||||||
@Override
|
@Override
|
||||||
public void activate() {
|
public void activate() {
|
||||||
InterlevelScene.returnDepth = Dungeon.depth;
|
InterlevelScene.returnDepth = Dungeon.depth;
|
||||||
for (Item item : Dungeon.hero.belongings.backpack.items){
|
for (Item item : Dungeon.hero.belongings.backpack.items.toArray( new Item[0])){
|
||||||
if (item instanceof Key && ((Key)item).depth == Dungeon.depth){
|
if (item instanceof Key && ((Key)item).depth == Dungeon.depth){
|
||||||
item.detachAll(Dungeon.hero.belongings.backpack);
|
item.detachAll(Dungeon.hero.belongings.backpack);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user