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

AddCoOwner() public method

public AddCoOwner ( Server.Mobile from, Server.Mobile targ ) : void
from Server.Mobile
targ Server.Mobile
return void
		public void AddCoOwner( Mobile from, Mobile targ )
		{
			if ( !IsOwner( from ) || m_CoOwners == null || m_Friends == null )
				return;

			if ( IsOwner( targ ) )
			{
				from.SendLocalizedMessage( 501360 ); // This person is already the house owner!
			}
			else if ( m_Friends.Contains( targ ) )
			{
				from.SendLocalizedMessage( 501361 ); // This person is a friend of the house. Remove them first.
			}
			else if ( !targ.Player )
			{
				from.SendLocalizedMessage( 501362 ); // That can't be a co-owner of the house.
			}
			else if ( HasAccountHouse( targ ) )
			{
				from.SendLocalizedMessage( 501364 ); // That person is already a house owner.
			}
			else if ( IsBanned( targ ) )
			{
				from.SendLocalizedMessage( 501367 ); // This person is banned!  Unban them first.
			}
			else if ( m_CoOwners.Count >= MaxCoOwners )
			{
				from.SendLocalizedMessage( 501368 ); // Your co-owner list is full!
			}
			else if ( m_CoOwners.Contains( targ ) )
			{
				from.SendLocalizedMessage( 501369 ); // This person is already on your co-owner list!
			}
			else
			{
				m_CoOwners.Add( targ );

				targ.Delta( MobileDelta.Noto );
				targ.SendLocalizedMessage( 501343 ); // You have been made a co-owner of this house.
			}
		}