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:
parent
469b89370d
commit
cde59a82f2
13 changed files with 347 additions and 162 deletions
|
|
@ -68,9 +68,7 @@ public static class Snooping
|
|||
{
|
||||
var message = $"You notice {from.Name} attempting to peek into {root.Name}'s belongings.";
|
||||
|
||||
var eable = map.GetClientsInRange(from.Location, 8);
|
||||
|
||||
foreach (var ns in eable)
|
||||
foreach (var ns in map.GetClientsInRange(from.Location, 8))
|
||||
{
|
||||
if (ns.Mobile != from)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue