Server.Mobiles.PlayerVendor.CanInteractWith C# (CSharp) Метод

CanInteractWith() публичный Метод

public CanInteractWith ( Mobile from, bool ownerOnly ) : bool
from Mobile
ownerOnly bool
Результат bool
		public bool CanInteractWith( Mobile from, bool ownerOnly )
		{
			if ( !from.CanSee( this ) || !Utility.InUpdateRange( from, this ) || !from.CheckAlive() )
				return false;

			if ( ownerOnly )
				return IsOwner( from );

			if ( House != null && House.IsBanned( from ) && !IsOwner( from ) )
			{
				from.SendLocalizedMessage( 1062674 ); // You can't shop from this home as you have been banned from this establishment.
				return false;
			}

			return true;
		}

Usage Example

Пример #1
0
            public override void OnResponse(Mobile from, string text)
            {
                if (!m_Vendor.CanInteractWith(from, true))
                {
                    return;
                }

                text = text.Trim();

                int amount = Utility.ToInt32(text);

                GiveGold(from, amount);
            }
All Usage Examples Of Server.Mobiles.PlayerVendor::CanInteractWith