From ca5aa80fcdcd896b88c878189ac81c1d7c7482fc Mon Sep 17 00:00:00 2001 From: Stefano Merotta <97297186+stefanomerotta@users.noreply.github.com> Date: Sat, 9 Dec 2023 01:02:23 +0100 Subject: [PATCH] fix: Fixes default GumpID and DropSound serialization for containers (#1631) --- Projects/Server/Items/Container.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Projects/Server/Items/Container.cs b/Projects/Server/Items/Container.cs index 97fe9b663..60c6e7eeb 100644 --- a/Projects/Server/Items/Container.cs +++ b/Projects/Server/Items/Container.cs @@ -99,6 +99,9 @@ public partial class Container : Item [SerializableFieldSaveFlag(1)] private bool ShouldSerializeGumpId() => _gumpID != -1; + [SerializableFieldDefault(1)] + private int GumpIDDefaultValue() => -1; + [EncodedInt] [SerializableProperty(2)] [CommandProperty(AccessLevel.GameMaster)] @@ -115,6 +118,9 @@ public partial class Container : Item [SerializableFieldSaveFlag(2)] private bool ShouldSerializeDropSound() => _dropSound != -1; + [SerializableFieldDefault(2)] + private int DropSoundDefaultValue() => -1; + [CommandProperty(AccessLevel.GameMaster)] public virtual int MaxWeight => Parent is Container { MaxWeight: 0 } ? 0 : DefaultMaxWeight;