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
|
|
@ -55,7 +55,6 @@ namespace Server.Spells.Chivalry
|
|||
queue.Enqueue(m);
|
||||
}
|
||||
}
|
||||
eable.Free();
|
||||
|
||||
while (queue.Count > 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -46,8 +46,6 @@ namespace Server.Spells.Chivalry
|
|||
}
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
|
||||
Caster.PlaySound(0x244);
|
||||
Caster.FixedParticles(0x3709, 1, 30, 9965, 5, 7, EffectLayer.Waist);
|
||||
Caster.FixedParticles(0x376A, 1, 30, 9502, 5, 3, EffectLayer.Waist);
|
||||
|
|
|
|||
|
|
@ -262,8 +262,6 @@ namespace Server.Spells.Fifth
|
|||
}
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
|
||||
while (queue.Count > 0)
|
||||
{
|
||||
var m = queue.Dequeue();
|
||||
|
|
|
|||
|
|
@ -57,8 +57,6 @@ namespace Server.Spells.Fourth
|
|||
}
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
|
||||
Effects.PlaySound(loc, Caster.Map, 0x299);
|
||||
|
||||
var cured = 0;
|
||||
|
|
|
|||
|
|
@ -59,8 +59,6 @@ namespace Server.Spells.Fourth
|
|||
}
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
|
||||
if (Core.AOS)
|
||||
{
|
||||
var party = Party.Get(Caster);
|
||||
|
|
|
|||
|
|
@ -47,9 +47,7 @@ namespace Server.Spells.Mysticism
|
|||
var casterParty = Party.Get(Caster);
|
||||
if (casterParty != null)
|
||||
{
|
||||
IPooledEnumerable eable = Caster.Map.GetMobilesInRange(m.Location, 2);
|
||||
|
||||
foreach (Mobile mob in eable)
|
||||
foreach (Mobile mob in Caster.Map.GetMobilesInRange(m.Location, 2))
|
||||
{
|
||||
if (mob == m)
|
||||
{
|
||||
|
|
@ -65,8 +63,6 @@ namespace Server.Spells.Mysticism
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
}
|
||||
|
||||
var primarySkill = GetBaseSkill(Caster);
|
||||
|
|
|
|||
|
|
@ -111,8 +111,6 @@ namespace Server.Spells.Necromancy
|
|||
pool.Enqueue(targ);
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
|
||||
while (pool.Count > 0)
|
||||
{
|
||||
var targ = pool.Dequeue();
|
||||
|
|
|
|||
|
|
@ -84,8 +84,6 @@ namespace Server.Spells.Necromancy
|
|||
pool.Enqueue(targ);
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
|
||||
Effects.PlaySound(Caster.Location, map, 0x1FB);
|
||||
Effects.PlaySound(Caster.Location, map, 0x10B);
|
||||
Effects.SendLocationParticles(
|
||||
|
|
|
|||
|
|
@ -56,8 +56,6 @@ namespace Server.Spells.Seventh
|
|||
pool.Enqueue(m);
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
|
||||
if (pool.Count > 0)
|
||||
{
|
||||
double damage = Core.AOS
|
||||
|
|
|
|||
|
|
@ -69,8 +69,6 @@ namespace Server.Spells.Seventh
|
|||
}
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
|
||||
while (queue.Count > 0)
|
||||
{
|
||||
queue.Dequeue().Delete();
|
||||
|
|
|
|||
|
|
@ -60,8 +60,6 @@ namespace Server.Spells.Seventh
|
|||
queue.Enqueue(m);
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
|
||||
double damage = Core.AOS
|
||||
? GetNewAosDamage(51, 1, 5, playerVsPlayer)
|
||||
: Utility.Random(27, 22);
|
||||
|
|
|
|||
|
|
@ -54,8 +54,6 @@ namespace Server.Spells.Sixth
|
|||
|
||||
HarmfulSpell(m);
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -53,8 +53,6 @@ namespace Server.Spells.Sixth
|
|||
m.FixedParticles(0x375A, 9, 20, 5049, EffectLayer.Head);
|
||||
m.PlaySound(0x1FD);
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -103,13 +103,10 @@ namespace Server.Spells.Spellweaving
|
|||
{
|
||||
if (item.Z + item.ItemData.CalcHeight == location.Z && IsValidTile(item.ItemID))
|
||||
{
|
||||
eable.Free();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -125,12 +122,9 @@ namespace Server.Spells.Spellweaving
|
|||
if (m != Caster && m is PlayerMobile && Caster.CanBeBeneficial(m, false) &&
|
||||
Math.Abs(spellWeaving - m.Skills.Spellweaving.Value) <= 20)
|
||||
{
|
||||
eable.Free();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -150,8 +144,6 @@ namespace Server.Spells.Spellweaving
|
|||
pool.Enqueue(m);
|
||||
}
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
return pool;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -63,8 +63,6 @@ namespace Server.Spells.Spellweaving
|
|||
new BuffInfo(BuffIcon.EssenceOfWind, 1075802, duration, m, $"{fcMalus}\t{ssiMalus}")
|
||||
);
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
}
|
||||
|
||||
FinishSequence();
|
||||
|
|
|
|||
|
|
@ -72,8 +72,6 @@ namespace Server.Spells.Spellweaving
|
|||
new BuffInfo(BuffIcon.Thunderstorm, 1075800, duration, m, GetCastRecoveryMalus(m))
|
||||
);
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
}
|
||||
|
||||
FinishSequence();
|
||||
|
|
|
|||
|
|
@ -106,8 +106,6 @@ namespace Server.Spells.Third
|
|||
item.OnMoveOver(m);
|
||||
}
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
}
|
||||
|
||||
FinishSequence();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue