mono compat attempt
This commit is contained in:
parent
752c6eeab1
commit
d2100dbfac
2 changed files with 15 additions and 10 deletions
|
|
@ -64,17 +64,22 @@ namespace Server.Commands.Generic
|
|||
}
|
||||
}
|
||||
|
||||
public sealed class Extensions : List<BaseExtension>
|
||||
public sealed class Extensions
|
||||
{
|
||||
private List<BaseExtension> _List;
|
||||
|
||||
public List<BaseExtension> List { get { return _List; } }
|
||||
|
||||
public Extensions()
|
||||
{
|
||||
_List = new List<BaseExtension>();
|
||||
}
|
||||
|
||||
public bool IsValid( object obj )
|
||||
{
|
||||
for ( int i = 0; i < this.Count; ++i )
|
||||
for ( int i = 0; i < _List.Count; ++i )
|
||||
{
|
||||
if ( !this[i].IsValid( obj ) )
|
||||
if ( !_List[i].IsValid( obj ) )
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -83,8 +88,8 @@ namespace Server.Commands.Generic
|
|||
|
||||
public void Filter( ArrayList list )
|
||||
{
|
||||
for ( int i = 0; i < this.Count; ++i )
|
||||
this[i].Filter( list );
|
||||
for ( int i = 0; i < _List.Count; ++i )
|
||||
_List[i].Filter( list );
|
||||
}
|
||||
|
||||
public static Extensions Parse( Mobile from, ref string[] args )
|
||||
|
|
@ -112,19 +117,19 @@ namespace Server.Commands.Generic
|
|||
if ( ext is WhereExtension )
|
||||
baseType = ( ext as WhereExtension ).Conditional.Type;
|
||||
|
||||
parsed.Add( ext );
|
||||
parsed.List.Add( ext );
|
||||
|
||||
size = i;
|
||||
}
|
||||
|
||||
parsed.Sort( delegate( BaseExtension a, BaseExtension b )
|
||||
parsed.List.Sort( delegate( BaseExtension a, BaseExtension b )
|
||||
{
|
||||
return ( a.Order - b.Order );
|
||||
} );
|
||||
|
||||
AssemblyEmitter emitter = null;
|
||||
|
||||
foreach ( BaseExtension update in parsed )
|
||||
foreach ( BaseExtension update in parsed.List )
|
||||
update.Optimize( from, baseType, ref emitter );
|
||||
|
||||
if ( size != args.Length )
|
||||
|
|
|
|||
|
|
@ -113,11 +113,11 @@ namespace Server.Commands.Generic
|
|||
|
||||
ObjectConditional cond = ObjectConditional.Empty;
|
||||
|
||||
foreach ( BaseExtension check in ext )
|
||||
foreach ( BaseExtension check in ext.List )
|
||||
{
|
||||
if ( check is WhereExtension )
|
||||
{
|
||||
cond = ( check as WhereExtension ).Conditional;
|
||||
cond = ((WhereExtension)check).Conditional;
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue