Adds better type support for pooled enumerables. Refactors code. (#16)
This commit is contained in:
parent
62b95f4d74
commit
b06f5bf60d
48 changed files with 252 additions and 243 deletions
|
|
@ -53,7 +53,7 @@ namespace Server.Spells.Seventh
|
|||
|
||||
if ( map != null )
|
||||
{
|
||||
IPooledEnumerable eable = map.GetMobilesInRange( new Point3D( p ), 2 );
|
||||
IPooledEnumerable<Mobile> eable = map.GetMobilesInRange( new Point3D( p ), 2 );
|
||||
|
||||
foreach ( Mobile m in eable )
|
||||
{
|
||||
|
|
@ -140,4 +140,4 @@ namespace Server.Spells.Seventh
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ namespace Server.Spells.Seventh
|
|||
{
|
||||
bool _gateFound = false;
|
||||
|
||||
IPooledEnumerable eable = map.GetItemsInRange( loc, 0 );
|
||||
IPooledEnumerable<Item> eable = map.GetItemsInRange( loc, 0 );
|
||||
foreach ( Item item in eable )
|
||||
{
|
||||
if ( item is Moongate || item is PublicMoongate )
|
||||
|
|
@ -255,4 +255,4 @@ namespace Server.Spells.Seventh
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,10 +49,10 @@ namespace Server.Spells.Seventh
|
|||
|
||||
if ( map != null )
|
||||
{
|
||||
IPooledEnumerable eable = map.GetMobilesInRange( new Point3D( p ), 8 );
|
||||
IPooledEnumerable<BaseCreature> eable = map.GetMobilesInRange<BaseCreature>( new Point3D( p ), 8 );
|
||||
|
||||
foreach ( Mobile m in eable )
|
||||
if ( m is BaseCreature && (m as BaseCreature).IsDispellable && Caster.CanBeHarmful( m, false ) )
|
||||
foreach ( BaseCreature m in eable )
|
||||
if ( m.IsDispellable && Caster.CanBeHarmful( m, false ) )
|
||||
targets.Add( m );
|
||||
|
||||
eable.Free();
|
||||
|
|
@ -111,4 +111,4 @@ namespace Server.Spells.Seventh
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ namespace Server.Spells.Seventh
|
|||
|
||||
if ( map != null )
|
||||
{
|
||||
IPooledEnumerable eable = map.GetMobilesInRange( new Point3D( p ), 2 );
|
||||
IPooledEnumerable<Mobile> eable = map.GetMobilesInRange( new Point3D( p ), 2 );
|
||||
|
||||
foreach ( Mobile m in eable )
|
||||
{
|
||||
|
|
@ -136,4 +136,4 @@ namespace Server.Spells.Seventh
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue