using System.Collections;
using System.Collections.Generic;
using Server.Network;
Code:
protected override void OnTarget( Mobile from, object o )
{
IPoint3D p = (IPoint3D)o;
if ( p == null && from == null && from.Map == null )
return;
List<Mobile> targets = new List<Mobile>();
foreach ( Mobile m in from.Map.GetMobilesInRange( new Point3D( p ), 1 ) )
if ( m != null && m.NetState != null && m.AccessLevel == AccessLevel.Player )
targets.Add( m );
if ( targets.Count <= 0 )
return;
Mobile target = targets[Utility.Random( targets.Count )];
target.ProcessDelta();
Packet packet = Packet.Acquire( new MovingEffect( from, target, itemID, speed, duration, fixeddirection, explodes, hue, rendermode ) );
target.NetState.Send( packet );
}
Fill in the red.