private static void Path( Mobile from, IPoint3D p, PathAlgorithm alg, string name, int zOffset )
{
m_OverrideAlgorithm = alg;
long start = DateTime.Now.Ticks;
MovementPath path = new MovementPath( from, new Point3D( p ) );
long end = DateTime.Now.Ticks;
double len = Math.Round( (end-start) / 10000.0, 2 );
if ( !path.Success )
{
from.SendMessage( "{0} path failed: {1}ms", name, len );
}
else
{
from.SendMessage( "{0} path success: {1}ms", name, len );
int x = from.X;
int y = from.Y;
int z = from.Z;
for ( int i = 0; i < path.Directions.Length; ++i )
{
Movement.Movement.Offset( path.Directions[i], ref x, ref y );
new Items.RecallRune().MoveToWorld( new Point3D( x, y, z+zOffset ), from.Map );
}
}
}