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

CheckAtDestination() public méthode

public CheckAtDestination ( ) : bool
Résultat bool
		public virtual bool CheckAtDestination()
		{
			EDI dest = GetDestination();

			if (dest == null)
				return false;

			Mobile escorter = GetEscorter();

			if (escorter == null)
				return false;

			if (dest.Contains(Location))
			{
				Say(1042809, escorter.Name); // We have arrived! I thank thee, ~1_PLAYER_NAME~! I have no further need of thy services. Here is thy pay.

				// not going anywhere
				m_Destination = null;
				m_DestinationString = null;

				Container cont = escorter.Backpack;

				if (cont == null)
					cont = escorter.BankBox;

				Gold gold = new Gold(500, 1000);

				if (!cont.TryDropItem(escorter, gold, false))
					gold.MoveToWorld(escorter.Location, escorter.Map);

				StopFollow();
				SetControlMaster(null);
				m_EscortTable.Remove(escorter);
				BeginDelete();

				Misc.Titles.AwardFame(escorter, 10, true);

				return true;
			}

			return false;
		}