public override bool IsFriendlyTarget(HumanObject ally) { if (Owner == null) { return(false); } return(Owner.IsFriendlyTarget(ally)); }
public override void BroadcastInfo() { if ((Spell != Spell.ExplosiveTrap) || (Caster == null)) { base.BroadcastInfo(); } Packet p; if (CurrentMap == null) { return; } for (int i = CurrentMap.Players.Count - 1; i >= 0; i--) { PlayerObject player = CurrentMap.Players[i]; if (Functions.InRange(CurrentLocation, player.CurrentLocation, Globals.DataRange)) { if ((Caster == null) || (player == null)) { continue; } if ((player == Caster) || (player.IsFriendlyTarget(Caster))) { p = GetInfo(); if (p != null) { player.Enqueue(p); } } } } }