Server.Items.BaseBulletinBoard.CheckRange C# (CSharp) Méthode

CheckRange() public méthode

public CheckRange ( Server.Mobile from ) : bool
from Server.Mobile
Résultat bool
		public virtual bool CheckRange( Mobile from )
		{
			if ( from.AccessLevel >= AccessLevel.GameMaster )
				return true;

			return ( from.Map == this.Map && from.InRange( GetWorldLocation(), 2 ) );
		}

Usage Example

        public static void BBClientRequest(NetState state, PacketReader pvSrc)
        {
            Mobile from = state.Mobile;

            int packetID            = pvSrc.ReadByte();
            BaseBulletinBoard board = World.FindItem(pvSrc.ReadInt32()) as BaseBulletinBoard;

            if (board == null || !board.CheckRange(from))
            {
                return;
            }

            switch (packetID)
            {
            case 3:
                BBRequestContent(from, board, pvSrc);
                break;

            case 4:
                BBRequestHeader(from, board, pvSrc);
                break;

            case 5:
                BBPostMessage(from, board, pvSrc);
                break;

            case 6:
                BBRemoveMessage(from, board, pvSrc);
                break;
            }
        }