fix: Adds AfterSerialize support. Removes BeforeSerialize support. (#1208)

### Changes
* Implements an AfterSerialize method that is executed synchronously.
* Removes `BeforeSerialize` support since it was dangerous in its current implementation.
* Moves PlayerMobile kill/virtual decay to AfterSerialize.
* Adds kill decay to after Deserialize.
This commit is contained in:
Kamron Batman 2022-10-27 23:27:22 -07:00 committed by GitHub
parent deabab575a
commit 49e6c6f2d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 132 additions and 61 deletions

View file

@ -39,6 +39,10 @@ public abstract class BaseGuild : ISerializable
public abstract string Name { get; set; }
public abstract GuildType Type { get; set; }
public abstract bool Disbanded { get; }
public abstract bool ShouldExecuteAfterSerialize { get; }
public abstract void AfterSerialize();
public abstract void Delete();
public bool Deleted => Disbanded;
@ -58,7 +62,6 @@ public abstract class BaseGuild : ISerializable
public int TypeRef { get; private set; }
public abstract void BeforeSerialize();
public abstract void Serialize(IGenericWriter writer);
public abstract void Deserialize(IGenericReader reader);