### Summary - [X] Fixed a bug where entity persistence was serialized out of order, causing world corruption. - [X] Fixed LastSerialized not being utilized properly and dangling references still becoming an issue. - [X] Added a new `GenericEntityPersistence<T>` type to encapsulate `ISerializable` serialization. - [X] Removing the custom logic and moved Items, Mobiles, Guilds, and Accounts to GenericEntityPersistence. - [X] Changed serialization to use the singleton pattern to reduce calling methods from stored variables.
21 lines
595 B
C#
21 lines
595 B
C#
namespace Server.Engines.BulkOrders;
|
|
|
|
public class BOBEntries : GenericEntityPersistence<IBOBEntry>
|
|
{
|
|
private static BOBEntries _bobEntriesPersistence;
|
|
|
|
public static void Configure()
|
|
{
|
|
_bobEntriesPersistence = new BOBEntries();
|
|
}
|
|
|
|
public BOBEntries() : base("BOBEntries", 3, 0x1, 0x7FFFFFFF)
|
|
{
|
|
}
|
|
|
|
public static Serial NewBOBEntry => _bobEntriesPersistence.NewEntity;
|
|
|
|
public static void Add(IBOBEntry entity) => _bobEntriesPersistence.AddEntity(entity);
|
|
|
|
public static void Remove(IBOBEntry entity) => _bobEntriesPersistence.AddEntity(entity);
|
|
}
|