Server.Multis.BaseHouse.IsBanned C# (CSharp) Méthode

IsBanned() public méthode

public IsBanned ( Mobile m ) : bool
m Mobile
Résultat bool
		public bool IsBanned( Mobile m )
		{
			if ( m == null || m == Owner || m.AccessLevel > AccessLevel.Player || m_Bans == null )
				return false;

			Account theirAccount = m.Account as Account;

			for ( int i = 0; i < m_Bans.Count; ++i )
			{
				Mobile c = (Mobile)m_Bans[i];

				if ( c == m )
					return true;

				Account bannedAccount = c.Account as Account;

				if ( bannedAccount != null && bannedAccount == theirAccount )
					return true;
			}

			return false;
		}

Usage Example

        public static bool CheckAccess( BaseHouse house, Mobile from )
        {
            if ( house.Public || !house.IsAosRules )
                return !house.IsBanned( from );

            return house.HasAccess( from );
        }
All Usage Examples Of Server.Multis.BaseHouse::IsBanned