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:
parent
deabab575a
commit
49e6c6f2d1
13 changed files with 132 additions and 61 deletions
|
|
@ -1041,6 +1041,12 @@ public class Item : IHued, IComparable<Item>, ISpawnable, IObjectPropertyListEnt
|
|||
}
|
||||
}
|
||||
|
||||
public virtual bool ShouldExecuteAfterSerialize => false;
|
||||
|
||||
public virtual void AfterSerialize()
|
||||
{
|
||||
}
|
||||
|
||||
public void MoveToWorld(WorldLocation worldLocation)
|
||||
{
|
||||
MoveToWorld(worldLocation.Location, worldLocation.Map);
|
||||
|
|
@ -2551,10 +2557,6 @@ public class Item : IHued, IComparable<Item>, ISpawnable, IObjectPropertyListEnt
|
|||
}
|
||||
}
|
||||
|
||||
public virtual void BeforeSerialize()
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Deserialize(IGenericReader reader)
|
||||
{
|
||||
var version = reader.ReadInt();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue