Fixes code according to modern code style. Fixes a few expression bugs.
This commit is contained in:
parent
89eea25e5f
commit
970fd563b2
3324 changed files with 441118 additions and 433755 deletions
|
|
@ -2,42 +2,38 @@ using System;
|
|||
|
||||
namespace Server.Commands.Generic
|
||||
{
|
||||
public sealed class WhereExtension : BaseExtension
|
||||
{
|
||||
public static ExtensionInfo ExtInfo = new ExtensionInfo( 20, "Where", -1, delegate { return new WhereExtension(); } );
|
||||
public sealed class WhereExtension : BaseExtension
|
||||
{
|
||||
public static ExtensionInfo ExtInfo = new ExtensionInfo(20, "Where", -1, delegate { return new WhereExtension(); });
|
||||
|
||||
public static void Initialize()
|
||||
{
|
||||
ExtensionInfo.Register( ExtInfo );
|
||||
}
|
||||
public override ExtensionInfo Info => ExtInfo;
|
||||
|
||||
public override ExtensionInfo Info => ExtInfo;
|
||||
public ObjectConditional Conditional{ get; private set; }
|
||||
|
||||
public ObjectConditional Conditional { get; private set; }
|
||||
public static void Initialize()
|
||||
{
|
||||
ExtensionInfo.Register(ExtInfo);
|
||||
}
|
||||
|
||||
public WhereExtension()
|
||||
{
|
||||
}
|
||||
public override void Optimize(Mobile from, Type baseType, ref AssemblyEmitter assembly)
|
||||
{
|
||||
if (baseType == null)
|
||||
throw new InvalidOperationException("Insanity.");
|
||||
|
||||
public override void Optimize( Mobile from, Type baseType, ref AssemblyEmitter assembly )
|
||||
{
|
||||
if ( baseType == null )
|
||||
throw new InvalidOperationException( "Insanity." );
|
||||
Conditional.Compile(ref assembly);
|
||||
}
|
||||
|
||||
Conditional.Compile( ref assembly );
|
||||
}
|
||||
public override void Parse(Mobile from, string[] arguments, int offset, int size)
|
||||
{
|
||||
if (size < 1)
|
||||
throw new Exception("Invalid condition syntax.");
|
||||
|
||||
public override void Parse( Mobile from, string[] arguments, int offset, int size )
|
||||
{
|
||||
if ( size < 1 )
|
||||
throw new Exception( "Invalid condition syntax." );
|
||||
Conditional = ObjectConditional.ParseDirect(from, arguments, offset, size);
|
||||
}
|
||||
|
||||
Conditional = ObjectConditional.ParseDirect( from, arguments, offset, size );
|
||||
}
|
||||
|
||||
public override bool IsValid( object obj )
|
||||
{
|
||||
return Conditional.CheckCondition( obj );
|
||||
}
|
||||
}
|
||||
}
|
||||
public override bool IsValid(object obj)
|
||||
{
|
||||
return Conditional.CheckCondition(obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue