Exemplo n.º 1
0
        /// <summary>
        /// Plays a sound to all mobiles within 20 tiles of the NPC emitting it
        /// </summary>
        /// <param name="m">The NPC producing the sound</param>
        /// <param name="sound">The sound to play</param>
        public void PlaySound(ChessMobile m, int sound)
        {
            if (m == null)
            {
                return;
            }

            Effects.PlaySound(m.Location, m.Map, sound);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Plays a sound to all mobiles within 20 tiles of the NPC emitting it
        /// </summary>
        /// <param name="m">The NPC producing the sound</param>
        /// <param name="sound">The sound to play</param>
        public void PlaySound(ChessMobile m, int sound)
        {
            if (m == null)
            {
                return;
            }

            Server.Network.Packet p = new Server.Network.PlaySound(sound, m.Location);

            foreach (Server.Network.NetState state in m.GetClientsInRange(20))
            {
                if (state.Mobile.CanSee(m))
                {
                    state.Send(p);
                }
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// Plays a sound to all mobiles within 20 tiles of the NPC emitting it
        /// </summary>
        /// <param name="m">The NPC producing the sound</param>
        /// <param name="sound">The sound to play</param>
        public void PlaySound(ChessMobile m, int sound)
        {
            if (m == null)
            {
                return;
            }

            Packet p = new PlaySound(sound, m.Location);

            p.Acquire();

            foreach (NetState state in m.GetClientsInRange(12))
            {
                if (state.Mobile.CanSee(m))
                {
                    state.Send(p);
                }
            }

            p.Release();
        }
Exemplo n.º 4
0
        public override void InitializePiece()
        {
            m_Piece      = new ChessMobile(this);
            m_Piece.Name = string.Format("Rook [{0}]", m_Color);

            switch (m_BChessboard.ChessSet)
            {
            case ChessSet.Classic: CreateClassic();
                break;

            case ChessSet.Fantasy: CreateFantasy();
                break;

            case ChessSet.FantasyGiant: CreateFantasyGiant();
                break;

            case ChessSet.Animal: CreateAnimal();
                break;

            case ChessSet.Undead: CreateUndead();
                break;
            }
        }
Exemplo n.º 5
0
		public override void InitializePiece()
		{
			m_Piece = new ChessMobile( this );
			m_Piece.Name = string.Format( "Queen [{0}]", m_Color.ToString() );

			switch ( m_BChessboard.ChessSet )
			{
				case ChessSet.Classic : CreateClassic();
					break;

				case ChessSet.Fantasy : CreateFantasy();
					break;

				case ChessSet.FantasyGiant : CreateFantasyGiant();
					break;

				case ChessSet.Animal : CreateAnimal();
					break;

				case ChessSet.Undead: CreateUndead();
					break;
			}
		}
Exemplo n.º 6
0
		/// <summary>
		/// Plays a sound to all mobiles within 20 tiles of the NPC emitting it
		/// </summary>
		/// <param name="m">The NPC producing the sound</param>
		/// <param name="sound">The sound to play</param>
		public void PlaySound( ChessMobile m, int sound )
		{
			if ( m == null )
				return;

			Server.Network.Packet p = new Server.Network.PlaySound( sound, m.Location );

			foreach( Server.Network.NetState state in m.GetClientsInRange( 20 ) )
			{
				if ( state.Mobile.CanSee( m ) )
					state.Send( p );
			}
		}
Exemplo n.º 7
0
		/// <summary>
		/// Plays a sound to all mobiles within 20 tiles of the NPC emitting it
		/// </summary>
		/// <param name="m">The NPC producing the sound</param>
		/// <param name="sound">The sound to play</param>
		public void PlaySound( ChessMobile m, int sound )
		{
			if ( m == null )
				return;

			Packet p = new PlaySound( sound, m.Location );

			p.Acquire();

			foreach( NetState state in m.GetClientsInRange( 12 ) )
				if ( state.Mobile.CanSee( m ) )
					state.Send( p );

			p.Release();
		}
Exemplo n.º 8
0
		/// <summary>
		/// Plays a sound to all mobiles within 20 tiles of the NPC emitting it
		/// </summary>
		/// <param name="m">The NPC producing the sound</param>
		/// <param name="sound">The sound to play</param>
		public void PlaySound( ChessMobile m, int sound )
		{
			if ( m == null )
				return;

			Effects.PlaySound( m.Location, m.Map, sound );
		}