fix: Adds GetClients to map iterators (#1574)

### Summary

Eliminates `IPooledEnumerable<NetState>` and `eable.Free()` from `Map` for clients. This drastically simplifies code that iterates in range, for example:

```cs
foreach (var m in m.GetClientsInRange(5))
{
}
```
The code above no longer requires an eable and calling `Free()`.
This commit is contained in:
Kamron Batman 2023-10-30 18:49:00 -07:00 • committed by GitHub
parent 469b89370d
commit cde59a82f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 347 additions and 162 deletions

View file

@ -129,9 +129,7 @@ public partial class Campfire : Item
}
}
var eable = GetClientsInRange(SecureRange);
foreach (var state in eable)
foreach (var state in GetClientsInRange(SecureRange))
{
if (state.Mobile is PlayerMobile pm && GetEntry(pm) == null)
{