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:
parent
c2d6578955
commit
d57f1fecc1
92 changed files with 644 additions and 907 deletions
|
|
@ -2193,8 +2193,6 @@ public abstract class BaseAI
|
|||
}
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
|
||||
if (destroyables > 0)
|
||||
{
|
||||
Effects.PlaySound(new Point3D(x, y, m_Mobile.Z), m_Mobile.Map, 0x3B3);
|
||||
|
|
@ -2764,8 +2762,6 @@ public abstract class BaseAI
|
|||
}
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
|
||||
m_Mobile.FocusMob = newFocusMob ?? enemySummonMob;
|
||||
return m_Mobile.FocusMob != null;
|
||||
}
|
||||
|
|
@ -2845,8 +2841,6 @@ public abstract class BaseAI
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
}
|
||||
|
||||
public virtual void Deactivate()
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ public abstract class AreaEffectMonsterAbility : MonsterAbility
|
|||
queue.Enqueue(m);
|
||||
}
|
||||
}
|
||||
eable.Free();
|
||||
|
||||
while (queue.Count > 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3649,8 +3649,6 @@ namespace Server.Mobiles
|
|||
}
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
|
||||
if (toRummage == null)
|
||||
{
|
||||
return false;
|
||||
|
|
@ -3813,7 +3811,6 @@ namespace Server.Mobiles
|
|||
queue.Enqueue(pet);
|
||||
}
|
||||
}
|
||||
eable.Free();
|
||||
|
||||
while (queue.Count > 0)
|
||||
{
|
||||
|
|
@ -5360,7 +5357,6 @@ namespace Server.Mobiles
|
|||
queue.Enqueue(m);
|
||||
}
|
||||
}
|
||||
eable.Free();
|
||||
|
||||
while (queue.Count > 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -84,8 +84,6 @@ public partial class HordeMinionFamiliar : BaseFamiliar
|
|||
}
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
|
||||
var pickedUp = 3;
|
||||
|
||||
while (pickedUp > 0 && queue.Count > 0)
|
||||
|
|
|
|||
|
|
@ -77,7 +77,6 @@ public partial class ShadowWispFamiliar : BaseFamiliar
|
|||
queue.Enqueue(m);
|
||||
}
|
||||
}
|
||||
eable.Free();
|
||||
|
||||
while (queue.Count > 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -305,8 +305,6 @@ namespace Server.Mobiles
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -124,8 +124,6 @@ namespace Server.Mobiles
|
|||
orc.MoveToWorld(map.GetRandomNearbyLocation(target.Location), map);
|
||||
orc.Combatant = target;
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -139,8 +139,6 @@ namespace Server.Mobiles
|
|||
m.FixedParticles(0x376A, 9, 32, 5030, EffectLayer.Waist);
|
||||
m.PlaySound(0x202);
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
}
|
||||
|
||||
base.OnThink();
|
||||
|
|
|
|||
|
|
@ -90,7 +90,6 @@ namespace Server.Mobiles
|
|||
queue.Enqueue(m);
|
||||
}
|
||||
}
|
||||
eable.Free();
|
||||
|
||||
if (queue.Count == 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -78,7 +78,6 @@ namespace Server.Mobiles
|
|||
queue.Enqueue(m);
|
||||
}
|
||||
}
|
||||
eable.Free();
|
||||
|
||||
var amount = queue.Count - 6;
|
||||
if (amount > 0)
|
||||
|
|
|
|||
|
|
@ -84,7 +84,6 @@ namespace Server.Mobiles
|
|||
queue.Enqueue(m);
|
||||
}
|
||||
}
|
||||
eable.Free();
|
||||
|
||||
var amount = queue.Count - 6;
|
||||
if (amount > 0)
|
||||
|
|
|
|||
|
|
@ -179,8 +179,6 @@ namespace Server.Mobiles
|
|||
); // * The plague beast attempts to absorb the remains, but cannot! *
|
||||
}
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
}
|
||||
|
||||
private void IncreaseHits(int hp)
|
||||
|
|
|
|||
|
|
@ -100,8 +100,6 @@ namespace Server.Mobiles
|
|||
Hits += bogling.Hits / 2;
|
||||
bogling.Delete();
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
}
|
||||
|
||||
public override void OnGotMeleeAttack(Mobile attacker, int damage)
|
||||
|
|
|
|||
|
|
@ -141,8 +141,6 @@ namespace Server.Mobiles
|
|||
m.FixedParticles(0x36BD, 1, 10, 0x1F78, 0xA6, 0, (EffectLayer)255);
|
||||
m.ApplyPoison(this, Poison.Lethal);
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -862,12 +862,9 @@ namespace Server.Mobiles
|
|||
{
|
||||
if (m.Z >= location.Z && m.Z < location.Z + 16 && (!m.Hidden || m.AccessLevel == AccessLevel.Player))
|
||||
{
|
||||
mobiles.Free();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
mobiles.Free();
|
||||
}
|
||||
|
||||
var bi = item.GetBounce();
|
||||
|
|
|
|||
|
|
@ -148,14 +148,11 @@ public partial class Barracoon : BaseChampion
|
|||
rats++;
|
||||
if (rats >= 16)
|
||||
{
|
||||
eable.Free();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
|
||||
PlaySound(0x3D);
|
||||
|
||||
rats = Utility.RandomMinMax(3, 6);
|
||||
|
|
|
|||
|
|
@ -539,7 +539,6 @@ public partial class Harrower : BaseCreature
|
|||
break;
|
||||
}
|
||||
}
|
||||
eable.Free();
|
||||
|
||||
if (toTeleport == null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -154,8 +154,6 @@ public partial class HarrowerTentacles : BaseCreature
|
|||
|
||||
m.Damage(drain, m_Owner);
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -132,8 +132,6 @@ public partial class Rikktor : BaseChampion
|
|||
m.Animate(20, 7, 1, true, false, 0); // take hit
|
||||
}
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
}
|
||||
|
||||
public override int GetAngerSound() => Utility.Random(0x2CE, 2);
|
||||
|
|
|
|||
|
|
@ -1277,8 +1277,6 @@ namespace Server.Mobiles
|
|||
m.OpenBackpack(from);
|
||||
}
|
||||
}
|
||||
|
||||
mobiles.Free();
|
||||
}
|
||||
|
||||
e.Handled = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue