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
|
|
@ -76,14 +76,10 @@ namespace Server.Commands
|
|||
|
||||
Rectangle2D rect = new Rectangle2D( start.X, start.Y, end.X - start.X + 1, end.Y - start.Y + 1 );
|
||||
|
||||
IPooledEnumerable eable;
|
||||
IPooledEnumerable<IEntity> eable;
|
||||
|
||||
if ( (items || multis) && mobiles )
|
||||
eable = map.GetObjectsInBounds( rect );
|
||||
else if ( items || multis )
|
||||
eable = map.GetItemsInBounds( rect );
|
||||
else if ( mobiles )
|
||||
eable = map.GetMobilesInBounds( rect );
|
||||
eable = map.GetObjectsInBounds( rect, items || multis, mobiles );
|
||||
else
|
||||
return;
|
||||
|
||||
|
|
@ -103,4 +99,4 @@ namespace Server.Commands
|
|||
toDelete[i].Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue