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
|
|
@ -83,17 +83,15 @@ namespace Server.SkillHandlers
|
|||
|
||||
if (Faction.Find(src) != null)
|
||||
{
|
||||
var itemsInRange = src.Map.GetItemsInRange<BaseFactionTrap>(p, range);
|
||||
|
||||
foreach (var trap in itemsInRange)
|
||||
foreach (var trap in src.Map.GetItemsInRange<BaseFactionTrap>(p, range))
|
||||
{
|
||||
if (src.CheckTargetSkill(SkillName.DetectHidden, trap, 80.0, 100.0))
|
||||
{
|
||||
src.SendLocalizedMessage(
|
||||
1042712,
|
||||
1042712, // You reveal a trap placed by a faction:
|
||||
true,
|
||||
$" {(trap.Faction == null ? "" : trap.Faction.Definition.FriendlyName)}"
|
||||
); // You reveal a trap placed by a faction:
|
||||
);
|
||||
|
||||
trap.Visible = true;
|
||||
trap.BeginConceal();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue