Server.Multis.BaseHouse.BeginConfirmTransfer C# (CSharp) Method

BeginConfirmTransfer() public method

public BeginConfirmTransfer ( Server.Mobile from, Server.Mobile to ) : void
from Server.Mobile
to Server.Mobile
return void
		public void BeginConfirmTransfer( Mobile from, Mobile to )
		{
			if ( Deleted || !from.CheckAlive() || !IsOwner( from ) )
				return;

			if ( DecayLevel == DecayLevel.DemolitionPending )
			{
				from.SendLocalizedMessage( 1005321 ); // This house has been marked for demolition, and it cannot be transferred.
			}
			else if ( from == to )
			{
				from.SendLocalizedMessage( 1005330 ); // You cannot transfer a house to yourself, silly.
			}
			else if ( to.Player )
			{
				if ( BaseHouse.HasAccountHouse( to ) )
				{
					from.SendLocalizedMessage( 501388 ); // You cannot transfer ownership to another house owner or co-owner!
				}
				else if ( CheckTransferPosition( from, to ) )
				{

                    from.SendLocalizedMessage(501338); // You have transferred ownership of the house.
                    to.SendLocalizedMessage(501339); // You are now the owner of this house. The house's co-owner, friend, ban, and access lists have been cleared. You should double-check the security settings on any doors and teleporters in the house.

                    this.RemoveKeys(from);
                    this.Owner = to;
                    this.Bans.Clear();
                    this.Friends.Clear();
                    this.CoOwners.Clear();
                    this.ChangeLocks(to);
                }
			}
			else
			{
				from.SendLocalizedMessage( 501384 ); // Only a player can own a house!
			}
		}