Server.Mobiles.TownCrier.OnSpeech C# (CSharp) Méthode

OnSpeech() public méthode

public OnSpeech ( SpeechEventArgs e ) : void
e SpeechEventArgs
Résultat void
		public override void OnSpeech( SpeechEventArgs e )
		{
			if ( m_NewsTimer == null && e.HasKeyword( 0x30 ) && e.Mobile.Alive && InRange( e.Mobile, 12 ) ) // *news*
			{
				Direction = GetDirectionTo( e.Mobile );

				TownCrierEntry tce = GetRandomEntry();

				if ( tce == null )
				{
					PublicOverheadMessage( MessageType.Regular, 0x3B2, 1005643 ); // I have no news at this time.
				}
				else
				{
					m_NewsTimer = Timer.DelayCall( TimeSpan.FromSeconds( 1.0 ), TimeSpan.FromSeconds( 3.0 ), new TimerStateCallback( ShoutNews_Callback ), new object[]{ tce, 0 } );

					PublicOverheadMessage( MessageType.Regular, 0x3B2, 502978 ); // Some of the latest news!
				}
			}
		}