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.
This commit is contained in:
Kamron Batman 2024-04-12 14:11:58 -07:00 committed by GitHub
parent 7ec19cf39a
commit 3e3b08e666
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)]