Bug fixes (#523)

* Fixes NPE with surge wave & bottles

* Fixed bracket :S

For some reason it PR'd my bracket and code separate? Weird.

* Changed dayfactor placement so that it's correct with avatar state factor
This commit is contained in:
Loony 2016-07-27 21:12:23 +01:00 committed by OmniCypher
parent 533d713774
commit cc39cc79f9
2 changed files with 6 additions and 4 deletions

View file

@ -70,18 +70,18 @@ public class FireBlastCharged extends FireAbility {
if (isDay(player.getWorld())) {
this.chargeTime = (long) (chargeTime / getDayFactor());
this.maxDamage = getDayFactor(maxDamage);
this.range = getDayFactor(range);
}
if (bPlayer.isAvatarState()) {
this.chargeTime = 0;
this.maxDamage = AvatarState.getValue(maxDamage);
}
this.range = getDayFactor(range);
if (!player.getEyeLocation().getBlock().isLiquid()) {
start();
} if (isDay(player.getWorld())) {
this.maxDamage = getDayFactor(maxDamage);
}
}
}
public static boolean annihilateBlasts(Location location, double radius, Player source) {

View file

@ -356,8 +356,10 @@ public class SurgeWave extends WaterAbility {
public void returnWater() {
if (location != null) {
if (player.isOnline()) {
new WaterReturn(player, location.getBlock());
}
}
}
private void thaw() {