fix: Changes Map.Sector.Items to link list. (#1547)
### Summary
Eliminates `IPooledEnumerable<T>` and `eable.Free()` from `Map` for items. This drastically simplifies code that iterates in range, for example:
```cs
foreach (var item in m.GetItemsInRange(5))
{
}
```
The code above no longer requires an eable and calling `Free()`.
This commit is contained in:
parent
1330c4a830
commit
24858f3989
42 changed files with 577 additions and 419 deletions
|
|
@ -147,8 +147,7 @@ namespace Server.Engines.Spawners
|
|||
|
||||
// Delete all spawners at this location.
|
||||
// Probably shouldn't do this outside of migrations? Is there a better way to find/fix spawners?
|
||||
var eable = map.GetItemsInRange<BaseSpawner>(location, 0);
|
||||
foreach (var spawner in eable)
|
||||
foreach (var spawner in map.GetItemsInRange<BaseSpawner>(location, 0))
|
||||
{
|
||||
if (spawner.GetType() == type)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue