PC-827
Team SSM - Teammates can no longer cancel each other's Blaze Firefly
This commit is contained in:
parent
df646b0659
commit
82b2541e34
@ -17,15 +17,17 @@ import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilBlock;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
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.game.Game;
|
||||
import nautilus.game.arcade.game.games.smash.TeamSuperSmash;
|
||||
import nautilus.game.arcade.kit.SmashPerk;
|
||||
import nautilus.game.arcade.kit.perks.data.FireflyData;
|
||||
|
||||
@ -170,6 +172,11 @@ public class PerkFirefly extends SmashPerk
|
||||
if (event.GetDamage() <= 4)
|
||||
return;
|
||||
|
||||
if (!(event.GetDamagerEntity(true) instanceof Player))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Iterator<FireflyData> dataIterator = _data.iterator();
|
||||
|
||||
while (dataIterator.hasNext())
|
||||
@ -181,6 +188,17 @@ public class PerkFirefly extends SmashPerk
|
||||
|
||||
if (!UtilTime.elapsed(data.Time, 1250) && !isSuperActive(data.Player))// && event.GetCause() == DamageCause.PROJECTILE)
|
||||
{
|
||||
Game game = Manager.GetGame();
|
||||
|
||||
if (game instanceof TeamSuperSmash)
|
||||
{
|
||||
if (game.GetTeam(data.Player).equals(game.GetTeam(event.GetDamagerPlayer(true))))
|
||||
{
|
||||
event.SetCancelled("Team Damage");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
dataIterator.remove();
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user