diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java index 0c38f43ef..45a27a998 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java @@ -452,7 +452,7 @@ public class Dungeon { private static final String DEPTH = "depth"; private static final String DROPPED = "dropped%d"; private static final String LEVEL = "level"; - private static final String LIMDROPS = "limiteddrops"; + private static final String LIMDROPS = "limited_drops"; private static final String CHAPTERS = "chapters"; private static final String QUESTS = "quests"; private static final String BADGES = "badges"; @@ -606,8 +606,9 @@ public class Dungeon { if (fullLoad) { - if( version <= 199 ){ - LimitedDrops.legacyRestore( bundle.getIntArray(LIMDROPS) ); + //pre-0.6.1 + if( bundle.contains("limiteddrops") ){ + LimitedDrops.legacyRestore( bundle.getIntArray("limiteddrops") ); } else { LimitedDrops.restore( bundle.getBundle(LIMDROPS) ); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java index cae26ceb5..4e7194381 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java @@ -178,15 +178,15 @@ public abstract class Level implements Bundlable { if (Dungeon.posNeeded()) { addItemToSpawn( new PotionOfStrength() ); - Dungeon.limitedDrops.strengthPotions.count++; + Dungeon.LimitedDrops.STRENGTH_POTIONS.count++; } if (Dungeon.souNeeded()) { addItemToSpawn( new ScrollOfUpgrade() ); - Dungeon.limitedDrops.upgradeScrolls.count++; + Dungeon.LimitedDrops.UPGRADE_SCROLLS.count++; } if (Dungeon.asNeeded()) { addItemToSpawn( new Stylus() ); - Dungeon.limitedDrops.arcaneStyli.count++; + Dungeon.LimitedDrops.ARCANE_STYLI.count++; } DriedRose rose = Dungeon.hero.belongings.getItem( DriedRose.class );