Server.Misc.TestCenter.EventSink_Speech C# (CSharp) Méthode

EventSink_Speech() private static méthode

private static EventSink_Speech ( SpeechEventArgs args ) : void
args SpeechEventArgs
Résultat void
		private static void EventSink_Speech( SpeechEventArgs args )
		{
			if ( !args.Handled )
			{
				if( Insensitive.StartsWith( args.Speech, "set" ) )
				{
					Mobile from = args.Mobile;

					string[] split = args.Speech.Split( ' ' );

					if ( split.Length == 3 )
					{
						try
						{
							string name = split[1];
							double value = Convert.ToDouble( split[2] );

							if ( Insensitive.Equals( name, "str" ) )
								ChangeStrength( from, (int)value );
							else if ( Insensitive.Equals( name, "dex" ) )
								ChangeDexterity( from, (int)value );
							else if ( Insensitive.Equals( name, "int" ) )
								ChangeIntelligence( from, (int)value );
							else
								ChangeSkill( from, name, value );
						}
						catch
						{
						}
					}
				}
				else if( Insensitive.Equals( args.Speech, "help" ) )
				{
					args.Mobile.SendGump( new TCHelpGump() );

					args.Handled = true;
				}
			}
		}