v3.3.3: fixed NPE caused by resurrection level reset + skeleton key
This commit is contained in:
+7
@@ -595,6 +595,13 @@ public class SkeletonKey extends Artifact {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//used if a level was reset, e.g. via unblessed ankh vs. boss
|
||||||
|
public void clearDepth(){
|
||||||
|
ironKeysNeeded[Dungeon.depth] = -1;
|
||||||
|
goldenKeysNeeded[Dungeon.depth] = -1;
|
||||||
|
crystalKeysNeeded[Dungeon.depth] = -1;
|
||||||
|
}
|
||||||
|
|
||||||
public void processIronLockOpened(){
|
public void processIronLockOpened(){
|
||||||
if (ironKeysNeeded[Dungeon.depth] == -1){
|
if (ironKeysNeeded[Dungeon.depth] == -1){
|
||||||
setupKeysForDepth();
|
setupKeysForDepth();
|
||||||
|
|||||||
+1
-1
@@ -769,7 +769,7 @@ public class InterlevelScene extends PixelScene {
|
|||||||
|
|
||||||
//need to reset key replacement tracking as well
|
//need to reset key replacement tracking as well
|
||||||
if (Dungeon.hero.buff(SkeletonKey.KeyReplacementTracker.class) != null){
|
if (Dungeon.hero.buff(SkeletonKey.KeyReplacementTracker.class) != null){
|
||||||
Dungeon.hero.buff(SkeletonKey.KeyReplacementTracker.class).setupKeysForDepth();
|
Dungeon.hero.buff(SkeletonKey.KeyReplacementTracker.class).clearDepth();
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user