Fixes expressions that are always true, null, or flase.
This commit is contained in:
parent
970fd563b2
commit
7321fa1b63
6 changed files with 14 additions and 29 deletions
|
|
@ -77,17 +77,17 @@ namespace Server.Commands
|
|||
|
||||
IPooledEnumerable<IEntity> eable;
|
||||
|
||||
if ((items || multis) && mobiles)
|
||||
eable = map.GetObjectsInBounds(rect, items || multis, mobiles);
|
||||
else
|
||||
if (!items && !multis || !mobiles)
|
||||
return;
|
||||
|
||||
eable = map.GetObjectsInBounds(rect, true, true);
|
||||
|
||||
foreach (IEntity obj in eable)
|
||||
if (items && obj is Item && !(obj is BaseMulti || obj is HouseSign))
|
||||
toDelete.Add(obj);
|
||||
else if (multis && obj is BaseMulti)
|
||||
toDelete.Add(obj);
|
||||
else if (mobiles && obj is Mobile mobile && !mobile.Player)
|
||||
else if (obj is Mobile mobile && !mobile.Player)
|
||||
toDelete.Add(mobile);
|
||||
|
||||
eable.Free();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue