fix: Adds defaults for codegenned clothing (#727)
This commit is contained in:
parent
ca3faec01d
commit
17521c9cd7
1 changed files with 12 additions and 0 deletions
|
|
@ -35,6 +35,9 @@ namespace Server.Items
|
|||
[SerializableFieldSaveFlag(1)]
|
||||
private bool ShouldSerializeAttributes() => !_attributes.IsEmpty;
|
||||
|
||||
[SerializableFieldDefault(1)]
|
||||
private AosAttributes AttributesDefaultValue() => new(this);
|
||||
|
||||
[SerializableField(2, setter: "private")]
|
||||
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster, canModify: true)]")]
|
||||
private AosArmorAttributes _clothingAttributes;
|
||||
|
|
@ -42,6 +45,9 @@ namespace Server.Items
|
|||
[SerializableFieldSaveFlag(2)]
|
||||
private bool ShouldSerializeClothingAttributes() => !_clothingAttributes.IsEmpty;
|
||||
|
||||
[SerializableFieldDefault(2)]
|
||||
private AosArmorAttributes ClothingAttributesDefaultValue() => new(this);
|
||||
|
||||
[SerializableField(3, setter: "private")]
|
||||
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster, canModify: true)]")]
|
||||
private AosSkillBonuses _skillBonuses;
|
||||
|
|
@ -49,6 +55,9 @@ namespace Server.Items
|
|||
[SerializableFieldSaveFlag(3)]
|
||||
private bool ShouldSerializeSkillBonuses() => !_skillBonuses.IsEmpty;
|
||||
|
||||
[SerializableFieldDefault(3)]
|
||||
private AosSkillBonuses SkillBonusesDefaultValue() => new(this);
|
||||
|
||||
[SerializableField(4, setter: "private")]
|
||||
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster, canModify: true)]")]
|
||||
private AosElementAttributes _resistances;
|
||||
|
|
@ -56,6 +65,9 @@ namespace Server.Items
|
|||
[SerializableFieldSaveFlag(4)]
|
||||
private bool ShouldSerializeResistances() => !_resistances.IsEmpty;
|
||||
|
||||
[SerializableFieldDefault(4)]
|
||||
private AosElementAttributes ResistancesDefaultValue() => new(this);
|
||||
|
||||
[EncodedInt]
|
||||
[InvalidateProperties]
|
||||
[SerializableField(5)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue