Fixes an issue where Blaze's "Firefly" and "Phoenix" abilities did no
damage or knockback.
This commit is contained in:
Sam 2016-06-18 15:33:39 +01:00
parent c19af4e1c5
commit d167f93486

View File

@ -3,11 +3,8 @@ package nautilus.game.arcade.kit.perks;
import java.util.HashSet;
import java.util.Iterator;
import org.bukkit.Color;
import org.bukkit.EntityEffect;
import org.bukkit.FireworkEffect;
import org.bukkit.Sound;
import org.bukkit.FireworkEffect.Type;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.block.Action;
@ -19,7 +16,6 @@ import mineplex.core.common.util.C;
import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilAction;
import mineplex.core.common.util.UtilBlock;
import mineplex.core.common.util.UtilFirework;
import mineplex.core.common.util.UtilParticle;
import mineplex.core.common.util.UtilParticle.ViewDist;
import mineplex.core.common.util.UtilServer;
@ -30,7 +26,6 @@ import mineplex.core.recharge.Recharge;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
import nautilus.game.arcade.kit.Perk;
import nautilus.game.arcade.kit.SmashPerk;
import nautilus.game.arcade.kit.perks.data.FireflyData;
@ -93,7 +88,7 @@ public class PerkFirefly extends SmashPerk
if (event.getType() != UpdateType.TICK)
return;
_tick = (_tick + 1)%1000;
_tick++;
Iterator<FireflyData> dataIterator = _data.iterator();
@ -147,11 +142,10 @@ public class PerkFirefly extends SmashPerk
continue;
other.playEffect(EntityEffect.HURT);
if (_tick == 0)
if (_tick % 12 == 0)
{
if (Recharge.Instance.use(other, GetName() + " hit by " + data.Player.getName(), 2000, false, false))
{
//Damage Event
Manager.GetDamage().NewDamageEvent(other, data.Player, null,
DamageCause.CUSTOM, 10, true, true, false,