PC-505
Fixed an issue where players could hit team members with Bouncy Bacon and get the health bonus from it.
This commit is contained in:
parent
09957c203b
commit
c19af4e1c5
@ -33,6 +33,7 @@ import mineplex.core.itemstack.ItemStackFactory;
|
|||||||
import mineplex.core.projectile.IThrown;
|
import mineplex.core.projectile.IThrown;
|
||||||
import mineplex.core.projectile.ProjectileUser;
|
import mineplex.core.projectile.ProjectileUser;
|
||||||
import mineplex.core.recharge.Recharge;
|
import mineplex.core.recharge.Recharge;
|
||||||
|
import nautilus.game.arcade.game.games.smash.TeamSuperSmash;
|
||||||
import nautilus.game.arcade.kit.SmashPerk;
|
import nautilus.game.arcade.kit.SmashPerk;
|
||||||
|
|
||||||
public class PerkPigBaconBounce extends SmashPerk implements IThrown
|
public class PerkPigBaconBounce extends SmashPerk implements IThrown
|
||||||
@ -109,6 +110,18 @@ public class PerkPigBaconBounce extends SmashPerk implements IThrown
|
|||||||
if (target == null)
|
if (target == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (Manager.GetGame() instanceof TeamSuperSmash && target instanceof Player && data.GetThrower() instanceof Player)
|
||||||
|
{
|
||||||
|
TeamSuperSmash smash = (TeamSuperSmash) Manager.GetGame();
|
||||||
|
Player targetPlayer = (Player) target;
|
||||||
|
Player throwerPlayer = (Player) data.GetThrower();
|
||||||
|
|
||||||
|
if(smash.GetTeam(targetPlayer).equals(smash.GetTeam(throwerPlayer)))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//Damage Event
|
//Damage Event
|
||||||
Manager.GetDamage().NewDamageEvent(target, data.GetThrower(), null,
|
Manager.GetDamage().NewDamageEvent(target, data.GetThrower(), null,
|
||||||
DamageCause.CUSTOM, 4, true, true, false,
|
DamageCause.CUSTOM, 4, true, true, false,
|
||||||
|
Loading…
Reference in New Issue
Block a user