Fix NPE found in FireBurst and Lightning

This commit is contained in:
Jack Lin 2015-01-18 18:44:52 +13:00
parent db0c691892
commit 3e9d568d40
2 changed files with 8 additions and 4 deletions

View file

@ -44,7 +44,9 @@ public class FireBurst {
}
if (AvatarState.isAvatarState(player))
chargetime = 0;
if (BendingManager.events.get(player.getWorld()).equalsIgnoreCase("SozinsComet")) chargetime = 0;
if (BendingManager.events.containsKey(player.getWorld())) {
if(BendingManager.events.get(player.getWorld()).equalsIgnoreCase("SozinsComet")) chargetime = 0;
}
this.player = player;
instances.put(player, this);
}

View file

@ -90,9 +90,11 @@ public class Lightning {
stunChance = AvatarState.getValue(stunChance);
//stunDuration = AvatarState.getValue(stunDuration);
}
else if(BendingManager.events.get(player.getWorld()).equalsIgnoreCase("SozinsComet")) {
chargeTime = 0;
cooldown = 0;
else if(BendingManager.events.containsKey(player.getWorld())) {
if (BendingManager.events.get(player.getWorld()).equalsIgnoreCase("SozinsComet")) {
chargeTime = 0;
cooldown = 0;
}
}
instances.add(this);
}