From a6c48b25fce764639db4e84c80a280b8d30ca29c Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Fri, 4 Oct 2019 14:55:53 -0400 Subject: [PATCH] v0.7.5a: added a safety check to necromancer sprites --- .../sprites/NecromancerSprite.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/NecromancerSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/NecromancerSprite.java index 3aaeb90ed..ee657b136 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/NecromancerSprite.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/NecromancerSprite.java @@ -63,10 +63,14 @@ public class NecromancerSprite extends MobSprite { public void onComplete(Animation anim) { super.onComplete(anim); if (anim == zap){ - if (((Necromancer) ch).summoning){ - charge(); + if (ch instanceof Necromancer){ + if (((Necromancer) ch).summoning){ + charge(); + } else { + ((Necromancer)ch).onZapComplete(); + idle(); + } } else { - ((Necromancer)ch).onZapComplete(); idle(); } }