fix: Prepares for IPooledEnumerable removal (#1548)

### Summary

- Removes `IPooledEnumerable` (non-generic)
- Changes `IPooledEnumerable<T>` so that  `Free()` is replaced with the `IDisposable` pattern
This commit is contained in:
Kamron Batman 2023-10-15 11:20:49 -07:00 • committed by GitHub
parent c2d6578955
commit d57f1fecc1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
92 changed files with 644 additions and 907 deletions

View file

@ -305,8 +305,6 @@ namespace Server.Mobiles
break;
}
}
eable.Free();
}
}
}

View file

@ -124,8 +124,6 @@ namespace Server.Mobiles
orc.MoveToWorld(map.GetRandomNearbyLocation(target.Location), map);
orc.Combatant = target;
}
eable.Free();
}
}
}

View file

@ -139,8 +139,6 @@ namespace Server.Mobiles
m.FixedParticles(0x376A, 9, 32, 5030, EffectLayer.Waist);
m.PlaySound(0x202);
}
eable.Free();
}
base.OnThink();

View file

@ -90,7 +90,6 @@ namespace Server.Mobiles
queue.Enqueue(m);
}
}
eable.Free();
if (queue.Count == 0)
{

View file

@ -120,7 +120,6 @@ namespace Server.Mobiles
var eable = Map.GetItemsInRange<StainedOoze>(p, 0);
using var enumerator = eable.GetEnumerator();
bool atLocation = enumerator.MoveNext();
eable.Free();
if (!atLocation)
{
break;

View file

@ -237,7 +237,6 @@ namespace Server.Mobiles
var eable = Map.GetItemsInRange<StainedOoze>(p, 0);
using var enumerator = eable.GetEnumerator();
bool atLocation = enumerator.MoveNext();
eable.Free();
if (!atLocation)
{
break;

View file

@ -246,8 +246,6 @@ public partial class Meraktus : BaseChampion
m.Animate(20, 7, 1, true, false, 0); // take hit
}
}
eable.Free();
}
private void MigrateFrom(V0Content content)

View file

@ -78,7 +78,6 @@ namespace Server.Mobiles
queue.Enqueue(m);
}
}
eable.Free();
var amount = queue.Count - 6;
if (amount > 0)

View file

@ -84,7 +84,6 @@ namespace Server.Mobiles
queue.Enqueue(m);
}
}
eable.Free();
var amount = queue.Count - 6;
if (amount > 0)

View file

@ -179,8 +179,6 @@ namespace Server.Mobiles
); // * The plague beast attempts to absorb the remains, but cannot! *
}
}
eable.Free();
}
private void IncreaseHits(int hp)

View file

@ -100,8 +100,6 @@ namespace Server.Mobiles
Hits += bogling.Hits / 2;
bogling.Delete();
}
eable.Free();
}
public override void OnGotMeleeAttack(Mobile attacker, int damage)

View file

@ -141,8 +141,6 @@ namespace Server.Mobiles
m.FixedParticles(0x36BD, 1, 10, 0x1F78, 0xA6, 0, (EffectLayer)255);
m.ApplyPoison(this, Poison.Lethal);
}
eable.Free();
}
}