Server.Commands.CommandHandlers.DeleteList_Callback C# (CSharp) Méthode

DeleteList_Callback() public static méthode

public static DeleteList_Callback ( Mobile from, bool okay, object state ) : void
from Mobile
okay bool
state object
Résultat void
		public static void DeleteList_Callback( Mobile from, bool okay, object state )
		{
			if ( okay )
			{
				List<IEntity> list = (List<IEntity>)state;

				CommandLogging.WriteLine( from, "{0} {1} deleting {2} object{3}", from.AccessLevel, CommandLogging.Format( from ), list.Count, list.Count == 1 ? "" : "s" );

				NetState.Pause();

				for ( int i = 0; i < list.Count; ++i )
					list[i].Delete();

				NetState.Resume();

				from.SendMessage( "You have deleted {0} object{1}.", list.Count, list.Count == 1 ? "" : "s" );
			}
			else
			{
				from.SendMessage( "You have chosen not to delete those objects." );
			}
		}