### Summary - `GenericEntityPersistence` is now a type of `GenericPersistence`. This allows developers to serialize both entities and non-entities in the same system. 🎉 - Each `SerializationThreadWorker` now allocates 1MB of heap for serialization _permanently_. If more memory is needed, that thread will double it's memory, not to exceed increments of 64MB. - Several bugs with serialization introduced with the pure MMF implementation have been fixed. - `BinaryFileReader` has been added back. 🎉 - Adds `world.useMultithreadedSaves` to allow disabling threaded saves. > [!IMPORTANT] > **Developer Note** > The split file serialization has been deprecated and is no longer used. We have effectively gone back to the same file writing we had before the pure MMF implementation.
30 lines
641 B
C#
30 lines
641 B
C#
using System;
|
|
using ModernUO.Serialization;
|
|
|
|
namespace Server.Ethics;
|
|
|
|
[SerializationGenerator(0)]
|
|
public partial class EthicsEntity : ISerializable
|
|
{
|
|
public EthicsEntity()
|
|
{
|
|
Serial = EthicsSystem.NewProfile;
|
|
EthicsSystem.Add(this);
|
|
}
|
|
|
|
public DateTime Created { get; set; } = Core.Now;
|
|
|
|
public Serial Serial { get; }
|
|
|
|
public byte SerializedThread { get; set; }
|
|
public int SerializedPosition { get; set; }
|
|
public int SerializedLength { get; set; }
|
|
|
|
public bool Deleted { get; private set; }
|
|
|
|
public void Delete()
|
|
{
|
|
Deleted = true;
|
|
EthicsSystem.Remove(this);
|
|
}
|
|
}
|