fixed shield smash and fissure affecting spectators

This commit is contained in:
fooify 2015-11-23 17:08:24 -08:00
parent f300fd2c98
commit f8401e0eeb
2 changed files with 12 additions and 3 deletions

View File

@ -84,6 +84,9 @@ public class ShieldSmash extends SkillActive
if (cur.equals(player))
continue;
if (UtilPlayer.isSpectator(cur))
continue;
if (UtilMath.offset(loc, cur.getLocation()) > 2.5)
continue;

View File

@ -94,13 +94,16 @@ public class FissureData
_loc.getWorld().playEffect(block.getLocation(), Effect.STEP_SOUND, block.getTypeId());
//Slow
for (Player cur : block.getWorld().getPlayers())
for (Player cur : block.getWorld().getPlayers()) {
if(UtilPlayer.isSpectator(cur)) continue;
if (!cur.equals(_player))
if (UtilMath.offset(block.getLocation().add(0.5, 0.5, 0.5), cur.getLocation()) < 1.5)
{
//Condition
Host.Factory.Condition().Factory().Slow("Fissure", cur, _player, 1 + _level, 1, false, true, true, true);
}
}
}
}
@ -142,7 +145,10 @@ public class FissureData
up.getWorld().playEffect(up.getLocation(), Effect.STEP_SOUND, block.getTypeId());
//Damage
for (Player cur : up.getWorld().getPlayers())
for (Player cur : up.getWorld().getPlayers()) {
if (UtilPlayer.isSpectator(cur))
continue;
if (!cur.equals(_player))
{
//Teleport
@ -168,7 +174,7 @@ public class FissureData
UtilPlayer.message(cur, F.main(Host.GetClassType().name(), F.name(_player.getName()) +" hit you with " + F.skill(Host.GetName(_level)) + "."));
}
}
}
//Next Column
if (_height >= Math.min(3, _handled/2 + 1))
{