public override bool ValidateArgs(BaseCommandImplementor impl, CommandEventArgs e) { if (e.Length >= 1) { Type t = ScriptCompiler.FindTypeByName(e.GetString(0)); if (t == null) { e.Mobile.SendMessage("No type with that name was found."); string match = e.GetString(0).Trim(); if (match.Length < 3) { e.Mobile.SendMessage("Invalid search string."); e.Mobile.SendGump(new AddGump(e.Mobile, match, 0, Type.EmptyTypes, false)); } else { e.Mobile.SendGump(new AddGump(e.Mobile, match, 0, AddGump.Match(match).ToArray(), true)); } } else { return(true); } } else { e.Mobile.SendGump(new CategorizedAddGump(e.Mobile)); } return(false); }
public override bool ValidateArgs( BaseCommandImplementor impl, CommandEventArgs e ) { if ( e.Length >= 1 ) { Type t = ScriptCompiler.FindTypeByName( e.GetString( 0 ) ); if ( t == null ) { e.Mobile.SendMessage( "No type with that name was found." ); string match = e.GetString( 0 ).Trim(); if ( match.Length < 3 ) { e.Mobile.SendMessage( "Invalid search string." ); e.Mobile.SendGump( new AddGump( e.Mobile, match, 0, Type.EmptyTypes, false ) ); } else { e.Mobile.SendGump( new AddGump( e.Mobile, match, 0, AddGump.Match( match ).ToArray(), true ) ); } } else { return true; } } else { e.Mobile.SendGump( new CategorizedAddGump( e.Mobile ) ); } return false; }
public override bool ValidateArgs( BaseCommandImplementor impl, CommandEventArgs e ) { if ( e.Arguments.Length >= 1 ) return true; e.Mobile.SendMessage( "Usage: " + Usage ); return false; }
public static void Register(BaseCommand command) { m_AllCommands.Add(command); List <BaseCommandImplementor> impls = BaseCommandImplementor.Implementors; for (int i = 0; i < impls.Count; ++i) { BaseCommandImplementor impl = impls[i]; if ((command.Supports & impl.SupportRequirement) != 0) { impl.Register(command); } } }
public static void Register( BaseCommandImplementor impl ) { m_Implementors.Add( impl ); impl.Register(); }
public virtual bool ValidateArgs(BaseCommandImplementor impl, CommandEventArgs e) { return true; }
public static void Register(BaseCommandImplementor impl) { m_Implementors.Add(impl); impl.Register(); }
public virtual bool ValidateArgs(BaseCommandImplementor impl, CommandEventArgs e) { return(true); }
public virtual bool ValidateArgs(BaseCommandImplementor impl, CommandEventArgs e) => true;
public override bool ValidateArgs( BaseCommandImplementor impl, CommandEventArgs e ) { if ( e.Arguments.Length >= 2 ) { m_augmenttype = SpawnerType.GetType(e.GetString( 0 )); if(m_augmenttype == null) { e.Mobile.SendMessage( "Unknown augment type: " + e.GetString( 0 )); return false; } m_oldversion = -1; try { m_oldversion = int.Parse(e.GetString( 1 )); } catch{} if(m_oldversion != -1) { return true; } } e.Mobile.SendMessage( "Usage: " + Usage ); return false; }
public override bool ValidateArgs( BaseCommandImplementor impl, CommandEventArgs e ) { if ( e.Arguments.Length >= 1 ) { try { m_maxsockets = int.Parse(e.GetString( 0 )); } catch { e.Mobile.SendMessage( "Usage: " + Usage ); return false; } return true; } e.Mobile.SendMessage( "Usage: " + Usage ); return false; }