Server.Mobiles.BaseEscortable.PickRandomDestination C# (CSharp) Méthode

PickRandomDestination() public méthode

public PickRandomDestination ( ) : string
Résultat string
		public virtual string PickRandomDestination()
		{
			if (Map.Felucca.Regions.Count == 0 || Map == null || Map == Map.Internal || Location == Point3D.Zero)
				return null; // Not yet fully initialized

			string[] possible = GetPossibleDestinations();
			string picked = null;

			while (picked == null)
			{
				picked = possible[Utility.Random(possible.Length)];
				EDI test = EDI.Find(picked);

				if (test != null && test.Contains(Location))
					picked = null;
			}

			return picked;
		}