/// <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); }
/// <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); } } }
/// <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(); }
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; } }
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; } }
/// <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 ); } }
/// <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(); }
/// <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 ); }