v2.2.0: added some null safety checks to quest music playback
This commit is contained in:
@@ -390,8 +390,10 @@ public abstract class Elemental extends Mob {
|
||||
Music.INSTANCE.fadeOut(1f, new Callback() {
|
||||
@Override
|
||||
public void call() {
|
||||
if (Dungeon.level != null) {
|
||||
Dungeon.level.playLevelMusic();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
+4
@@ -194,8 +194,10 @@ public class Ghost extends NPC {
|
||||
Music.INSTANCE.fadeOut(1f, new Callback() {
|
||||
@Override
|
||||
public void call() {
|
||||
if (Dungeon.level != null) {
|
||||
Dungeon.level.playLevelMusic();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
} );
|
||||
@@ -367,8 +369,10 @@ public class Ghost extends NPC {
|
||||
Music.INSTANCE.fadeOut(1f, new Callback() {
|
||||
@Override
|
||||
public void call() {
|
||||
if (Dungeon.level != null) {
|
||||
Dungeon.level.playLevelMusic();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
+2
-1
@@ -358,7 +358,8 @@ public class Wandmaker extends NPC {
|
||||
//quest is active if:
|
||||
public static boolean active(){
|
||||
//it is not completed
|
||||
if (wand1 == null || wand2 == null || !(Dungeon.level instanceof RegularLevel)){
|
||||
if (wand1 == null || wand2 == null
|
||||
|| !(Dungeon.level instanceof RegularLevel) || Dungeon.hero == null){
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -150,12 +150,13 @@ public class CorpseDust extends Item {
|
||||
Game.runOnRenderThread(new Callback() {
|
||||
@Override
|
||||
public void call() {
|
||||
//maybe have a fade here?
|
||||
Music.INSTANCE.fadeOut(1f, new Callback() {
|
||||
@Override
|
||||
public void call() {
|
||||
if (Dungeon.level != null) {
|
||||
Dungeon.level.playLevelMusic();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -157,8 +157,10 @@ public class PrisonLevel extends RegularLevel {
|
||||
Music.INSTANCE.fadeOut(1f, new Callback() {
|
||||
@Override
|
||||
public void call() {
|
||||
if (Dungeon.level != null) {
|
||||
Dungeon.level.playLevelMusic();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user