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:
parent
7ec19cf39a
commit
3e3b08e666
1 changed files with 3 additions and 0 deletions
|
|
@ -83,6 +83,9 @@ public partial class Container : Item
|
||||||
[SerializableFieldSaveFlag(0)]
|
[SerializableFieldSaveFlag(0)]
|
||||||
private bool ShouldSerializeMaxItems() => _maxItems != -1;
|
private bool ShouldSerializeMaxItems() => _maxItems != -1;
|
||||||
|
|
||||||
|
[SerializableFieldDefault(0)]
|
||||||
|
private int MaxItemsDefaultValue() => -1;
|
||||||
|
|
||||||
[EncodedInt]
|
[EncodedInt]
|
||||||
[SerializableProperty(1)]
|
[SerializableProperty(1)]
|
||||||
[CommandProperty(AccessLevel.GameMaster)]
|
[CommandProperty(AccessLevel.GameMaster)]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue