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

@ -346,8 +346,6 @@ public class Item : IHued, IComparable<Item>, ISpawnable, IObjectPropertyListEnt
state.Send(removeEntity);
}
}
eable.Free();
}
Delta(ItemDelta.Update);
@ -1148,8 +1146,6 @@ public class Item : IHued, IComparable<Item>, ISpawnable, IObjectPropertyListEnt
}
}
}
eable.Free();
}
RemDelta(ItemDelta.Update);
@ -1179,8 +1175,6 @@ public class Item : IHued, IComparable<Item>, ISpawnable, IObjectPropertyListEnt
state.Send(removeEntity);
}
}
eable.Free();
}
var oldInternalLocation = m_Location;
@ -1200,8 +1194,6 @@ public class Item : IHued, IComparable<Item>, ISpawnable, IObjectPropertyListEnt
}
}
eable.Free();
m_Map.OnMove(oldInternalLocation, this);
RemDelta(ItemDelta.Update);
@ -1403,8 +1395,6 @@ public class Item : IHued, IComparable<Item>, ISpawnable, IObjectPropertyListEnt
SendOPLPacketTo(state);
}
}
eable.Free();
}
public virtual void Delete()
@ -1516,8 +1506,6 @@ public class Item : IHued, IComparable<Item>, ISpawnable, IObjectPropertyListEnt
state.Send(removeEntity);
}
}
eable.Free();
}
var oldLoc = m_Location;
@ -1539,8 +1527,6 @@ public class Item : IHued, IComparable<Item>, ISpawnable, IObjectPropertyListEnt
}
}
eable.Free();
RemDelta(ItemDelta.Update);
}
else
@ -3302,8 +3288,6 @@ public class Item : IHued, IComparable<Item>, ISpawnable, IObjectPropertyListEnt
state.Send(buffer);
}
}
eable.Free();
}
public void PublicOverheadMessage(MessageType type, int hue, int number, string args = "")
@ -3336,8 +3320,6 @@ public class Item : IHued, IComparable<Item>, ISpawnable, IObjectPropertyListEnt
state.Send(buffer);
}
}
eable.Free();
}
public virtual void OnAfterDelete()
@ -3589,8 +3571,6 @@ public class Item : IHued, IComparable<Item>, ISpawnable, IObjectPropertyListEnt
items.Add(item);
}
eable.Free();
if (z == int.MinValue)
{
return false;
@ -3792,8 +3772,6 @@ public class Item : IHued, IComparable<Item>, ISpawnable, IObjectPropertyListEnt
state.Send(removeEntity);
}
}
eable.Free();
}
public virtual int GetDropSound() => -1;