From 3e3b08e66693d0fa8e40c230ad8ec80a034a05f6 Mon Sep 17 00:00:00 2001 From: Kamron Batman <3953314+kamronbatman@users.noreply.github.com> Date: Fri, 12 Apr 2024 14:11:58 -0700 Subject: [PATCH] fix: Fixes max items serializatio n issue (#1728) ### Summary Fixes an issue where max items is deserialized as 0 instead of -1. To fix broken containers, run the following in-game: `[global set maxitems -1 where container maxitems = 0` In vanilla MUO, there are no containers that actually have max items set to 0. --- Projects/Server/Items/Container.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Projects/Server/Items/Container.cs b/Projects/Server/Items/Container.cs index 60c6e7eeb..2d50aa8b3 100644 --- a/Projects/Server/Items/Container.cs +++ b/Projects/Server/Items/Container.cs @@ -83,6 +83,9 @@ public partial class Container : Item [SerializableFieldSaveFlag(0)] private bool ShouldSerializeMaxItems() => _maxItems != -1; + [SerializableFieldDefault(0)] + private int MaxItemsDefaultValue() => -1; + [EncodedInt] [SerializableProperty(1)] [CommandProperty(AccessLevel.GameMaster)]