feat: Adds SerializedCommandProperty (#1249)

## Breaking Change
* Removes `SerializableFieldAttrAttribute` in favor of `SerializedPropertyAttr`.

## Important Change
* Adds `SerializedCommandProperty`

Example:
```cs
    [InvalidateProperties]
    [SerializableField(0)]
    [SerializedCommandProperty(AccessLevel.GameMaster)]
    private Mobile _completedBy;
```
This commit is contained in:
Kamron Batman 2022-11-14 18:24:33 -08:00 committed by GitHub
parent 5660f4636e
commit 936000ecf7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
79 changed files with 272 additions and 231 deletions

View file

@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"modernuoschemagenerator": {
"version": "2.5.3",
"version": "2.6.0",
"commands": [
"ModernUOSchemaGenerator"
]

View file

@ -1,6 +1,22 @@
/*************************************************************************
* ModernUO *
* Copyright 2019-2022 - ModernUO Development Team *
* Email: hi@modernuo.com *
* File: Attributes.cs *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
*************************************************************************/
using System;
using System.Collections.Generic;
using System.Reflection;
using ModernUO.Serialization;
namespace Server;
@ -133,3 +149,28 @@ public class CommandPropertyAttribute : Attribute
public bool ReadOnly { get; }
public bool CanModify { get; }
}
[AttributeUsage(AttributeTargets.Field)]
public class SerializedCommandPropertyAttribute : SerializedPropertyAttrAttribute<CommandPropertyAttribute>
{
public SerializedCommandPropertyAttribute(
AccessLevel level,
bool readOnly = false,
bool canModify = false
) : this(level, level)
{
ReadOnly = readOnly;
CanModify = canModify;
}
public SerializedCommandPropertyAttribute(AccessLevel readLevel, AccessLevel writeLevel)
{
ReadLevel = readLevel;
WriteLevel = writeLevel;
}
public AccessLevel ReadLevel { get; }
public AccessLevel WriteLevel { get; }
public bool ReadOnly { get; }
public bool CanModify { get; }
}

View file

@ -36,8 +36,8 @@
<PackageReference Include="Standart.Hash.xxHash.Signed" Version="4.0.5" />
<PackageReference Include="Zlib.Bindings" Version="1.10.1" />
<PackageReference Include="ModernUO.Serialization.Annotations" Version="2.5.3" />
<PackageReference Include="ModernUO.Serialization.Generator" Version="2.5.2" />
<PackageReference Include="ModernUO.Serialization.Annotations" Version="2.6.0" />
<PackageReference Include="ModernUO.Serialization.Generator" Version="2.6.0" />
</ItemGroup>
<ItemGroup>
<AdditionalFiles Include="Migrations/*.v*.json" />

View file

@ -43,7 +43,7 @@ namespace Server.Accounting
/// 0 to 999,999,999 by default.
/// </summary>
[SerializableField(6, setter: "private")]
[SerializableFieldAttr("[CommandProperty(AccessLevel.Administrator)]")]
[SerializedCommandProperty(AccessLevel.Administrator)]
public int _totalGold;
/// <summary>
@ -53,7 +53,7 @@ namespace Server.Accounting
/// One Platinum represents the value of CurrencyThreshold in Gold.
/// </summary>
[SerializableField(7, setter: "private")]
[SerializableFieldAttr("[CommandProperty(AccessLevel.Administrator)]")]
[SerializedCommandProperty(AccessLevel.Administrator)]
public int _totalPlat;
private Mobile[] _mobiles;
@ -117,7 +117,7 @@ namespace Server.Accounting
}
[SerializableField(14)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.Administrator)]")]
[SerializedCommandProperty(AccessLevel.Administrator)]
private string _email;
private Timer m_YoungTimer;

View file

@ -24,17 +24,17 @@ namespace Server.Engines.BulkOrders
[SerializableField(0)]
[InvalidateProperties]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _amountMax;
[SerializableField(1)]
[InvalidateProperties]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private bool _requireExceptional;
[SerializableField(2)]
[InvalidateProperties]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private BulkMaterialType _material;
public static BulkMaterialType GetRandomMaterial(BulkMaterialType start, double[] chances)

View file

@ -11,25 +11,25 @@ namespace Server.Items
[InternString]
[InvalidateProperties]
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private string _owner;
[InternString]
[InvalidateProperties]
[SerializableField(1)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private string _line1;
[InternString]
[InvalidateProperties]
[SerializableField(2)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private string _line2;
[InternString]
[InvalidateProperties]
[SerializableField(3)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private string _line3;
public StValentinesBear(int itemid, string name) : base(itemid)

View file

@ -9,13 +9,13 @@ namespace Server.Items
[InternString]
[InvalidateProperties]
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private string _from;
[InternString]
[InvalidateProperties]
[SerializableField(1)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private string _to;
[Constructible]

View file

@ -28,7 +28,7 @@ namespace Server.Items
{
[InvalidateProperties]
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _number;
[Constructible]
@ -104,11 +104,11 @@ namespace Server.Items
}
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
public BaseAddon _addon;
[SerializableField(1)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
public Point3D _offset;
[Hue]

View file

@ -22,11 +22,11 @@ namespace Server.Items
public virtual Point3D WallPosition => Point3D.Zero;
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private BaseAddonContainer _addon;
[SerializableField(1)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private Point3D _offset;
[Hue]

View file

@ -21,11 +21,11 @@ namespace Server.Items
}
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private double _minSkill;
[SerializableField(1)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private double _maxSkill;
[CommandProperty(AccessLevel.GameMaster)]
@ -39,11 +39,11 @@ namespace Server.Items
}
[SerializableField(2)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _arrows;
[SerializableField(3)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _bolts;
public override void OnDoubleClick(Mobile from)

View file

@ -10,11 +10,11 @@ namespace Server.Items
private Timer m_Timer;
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private double _minSkill;
[SerializableField(1)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private double _maxSkill;
public PickpocketDip(int itemID) : base(itemID)

View file

@ -8,7 +8,7 @@ namespace Server.Items
public partial class SHTeleComponent : AddonComponent
{
[SerializableField(2)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private Point3D _teleOffset;
[Constructible]
@ -101,23 +101,23 @@ namespace Server.Items
private bool m_Changing;
[SerializableField(0, setter: "private")]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private bool _external;
[SerializableField(1, setter: "private")]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private SHTeleComponent _upTele;
[SerializableField(2, setter: "private")]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private SHTeleComponent _rightTele;
[SerializableField(3, setter: "private")]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private SHTeleComponent _downTele;
[SerializableField(4, setter: "private")]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private SHTeleComponent _leftTele;
[Constructible]

View file

@ -10,11 +10,11 @@ namespace Server.Items
private Timer m_Timer;
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private double _minSkill;
[SerializableField(1)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private double _maxSkill;
[Constructible]

View file

@ -38,22 +38,22 @@ namespace Server.Items
}
[SerializableField(1, setter: "private")]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _liveCreatures;
[InvalidateProperties]
[SerializableField(2, setter: "private")]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _vacationLeft;
[InvalidateProperties]
[SerializableField(3, setter: "private")]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private AquariumState _food;
[InvalidateProperties]
[SerializableField(4, setter: "private")]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private AquariumState _water;
[SerializableField(5, setter: "private")]
@ -61,7 +61,7 @@ namespace Server.Items
[InvalidateProperties]
[SerializableField(6)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private bool _rewardAvailable;
public Aquarium(int itemID) : base(itemID)

View file

@ -46,15 +46,15 @@ namespace Server.Items
}
[SerializableField(1)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _maintain;
[SerializableField(2)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _improve;
[SerializableField(3)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _added;
public override string ToString() => "...";

View file

@ -15,7 +15,7 @@ namespace Server.Items
public abstract partial class BaseArmor : Item, IScissorable, IFactionItem, ICraftable, IWearableDurability
{
[SerializableField(0, setter: "private")]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster, canModify: true)]")]
[SerializedCommandProperty(AccessLevel.GameMaster, canModify: true)]
private AosAttributes _attributes;
[SerializableFieldSaveFlag(0)]
@ -25,7 +25,7 @@ namespace Server.Items
private AosAttributes AttributesDefaultValue() => new(this);
[SerializableField(1, setter: "private")]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster, canModify: true)]")]
[SerializedCommandProperty(AccessLevel.GameMaster, canModify: true)]
private AosArmorAttributes _armorAttributes;
[SerializableFieldSaveFlag(1)]
@ -37,7 +37,7 @@ namespace Server.Items
[EncodedInt]
[InvalidateProperties]
[SerializableField(2)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _physicalBonus;
[SerializableFieldSaveFlag(2)]
@ -46,7 +46,7 @@ namespace Server.Items
[EncodedInt]
[InvalidateProperties]
[SerializableField(3)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _fireBonus;
[SerializableFieldSaveFlag(3)]
@ -55,7 +55,7 @@ namespace Server.Items
[EncodedInt]
[InvalidateProperties]
[SerializableField(4)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _coldBonus;
[SerializableFieldSaveFlag(4)]
@ -64,7 +64,7 @@ namespace Server.Items
[EncodedInt]
[InvalidateProperties]
[SerializableField(5)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _poisonBonus;
[SerializableFieldSaveFlag(5)]
@ -73,14 +73,14 @@ namespace Server.Items
[EncodedInt]
[InvalidateProperties]
[SerializableField(6)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _energyBonus;
[SerializableFieldSaveFlag(6)]
private bool ShouldSerializeEnergyBonus() => _energyBonus != 0;
[SerializableField(7)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private bool _identified;
[SerializableFieldSaveFlag(7)]
@ -88,7 +88,7 @@ namespace Server.Items
[EncodedInt]
[SerializableField(8)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _maxHitPoints;
[SerializableFieldSaveFlag(8)]
@ -96,7 +96,7 @@ namespace Server.Items
[InvalidateProperties]
[SerializableField(10)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private string _crafter;
[SerializableFieldSaveFlag(10)]
@ -133,7 +133,7 @@ namespace Server.Items
private AMA _meditate = (AMA)(-1);
[SerializableField(23, setter: "private")]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster, canModify: true)]")]
[SerializedCommandProperty(AccessLevel.GameMaster, canModify: true)]
public AosSkillBonuses _skillBonuses;
[SerializableFieldSaveFlag(23)]
@ -143,7 +143,7 @@ namespace Server.Items
private AosSkillBonuses SkillBonusesDefaultValue() => new(this);
[SerializableField(24)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
public bool _playerConstructed;
[SerializableFieldSaveFlag(24)]

View file

@ -33,7 +33,7 @@ namespace Server.Items
public override ArmorMeditationAllowance DefMedAllowance => ArmorMeditationAllowance.All;
[SerializableField(0, setter: "private")]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster, canModify: true)]")]
[SerializedCommandProperty(AccessLevel.GameMaster, canModify: true)]
public AosWeaponAttributes _weaponAttributes;
[SerializableFieldSaveFlag(0)]

View file

@ -14,12 +14,12 @@ namespace Server.Items
{
[InvalidateProperties]
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private string _playerName;
[InvalidateProperties]
[SerializableField(1)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private HeadType _headType;
[Constructible]

View file

@ -12,13 +12,13 @@ namespace Server.Items
public partial class BaseBook : Item, ISecurable
{
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private SecureLevel _level;
[InternString]
[InvalidateProperties]
[SerializableField(1)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private string _title;
[SerializableFieldSaveFlag(1)]
@ -29,7 +29,7 @@ namespace Server.Items
[InvalidateProperties]
[SerializableField(2)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private string _author;
[SerializableFieldSaveFlag(2)]
@ -39,7 +39,7 @@ namespace Server.Items
private string AuthorDefaultValue() => DefaultContent?.Author;
[SerializableField(3)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private bool _writable;
[SerializableFieldSaveFlag(3)]

View file

@ -48,7 +48,7 @@ namespace Server.Items
public abstract partial class BaseBulletinBoard : Item
{
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private string _boardName;
public BaseBulletinBoard(int itemID) : base(itemID)

View file

@ -30,7 +30,7 @@ namespace Server.Items
private bool ShouldSerializeResource() => _resource != DefaultResource;
[SerializableField(1, setter: "private")]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster, canModify: true)]")]
[SerializedCommandProperty(AccessLevel.GameMaster, canModify: true)]
private AosAttributes _attributes;
[SerializableFieldSaveFlag(1)]
@ -40,7 +40,7 @@ namespace Server.Items
private AosAttributes AttributesDefaultValue() => new(this);
[SerializableField(2, setter: "private")]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster, canModify: true)]")]
[SerializedCommandProperty(AccessLevel.GameMaster, canModify: true)]
private AosArmorAttributes _clothingAttributes;
[SerializableFieldSaveFlag(2)]
@ -50,7 +50,7 @@ namespace Server.Items
private AosArmorAttributes ClothingAttributesDefaultValue() => new(this);
[SerializableField(3, setter: "private")]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster, canModify: true)]")]
[SerializedCommandProperty(AccessLevel.GameMaster, canModify: true)]
private AosSkillBonuses _skillBonuses;
[SerializableFieldSaveFlag(3)]
@ -60,7 +60,7 @@ namespace Server.Items
private AosSkillBonuses SkillBonusesDefaultValue() => new(this);
[SerializableField(4, setter: "private")]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster, canModify: true)]")]
[SerializedCommandProperty(AccessLevel.GameMaster, canModify: true)]
private AosElementAttributes _resistances;
[SerializableFieldSaveFlag(4)]
@ -72,14 +72,14 @@ namespace Server.Items
[EncodedInt]
[InvalidateProperties]
[SerializableField(5)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _maxHitPoints;
[SerializableFieldSaveFlag(5)]
private bool ShouldSerializeMaxHitPoints() => _maxHitPoints != 0;
[SerializableField(7)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private bool _playerConstructed;
[SerializableFieldSaveFlag(7)]
@ -87,7 +87,7 @@ namespace Server.Items
[InvalidateProperties]
[SerializableField(8)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private string _crafter;
[SerializableFieldSaveFlag(8)]
@ -95,7 +95,7 @@ namespace Server.Items
[InvalidateProperties]
[SerializableField(9)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private ClothingQuality _quality = ClothingQuality.Regular;
[SerializableFieldSaveFlag(9)]

View file

@ -114,11 +114,11 @@ namespace Server.Items
{
[InvalidateProperties]
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _number;
[SerializableField(1)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private bool _isRewardItem;
[Constructible]

View file

@ -11,7 +11,7 @@ namespace Server.Items
public abstract partial class BaseHat : BaseClothing, IShipwreckedItem
{
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private bool _isShipwreckedItem;
public BaseHat(int itemID, int hue = 0) : base(itemID, Layer.Helm, hue)

View file

@ -147,11 +147,11 @@ namespace Server.Items
{
[InvalidateProperties]
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _number;
[SerializableField(1)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private bool _isRewardItem;
[Constructible]
@ -229,11 +229,11 @@ namespace Server.Items
{
[InvalidateProperties]
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _number;
[SerializableField(1)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private bool _isRewardItem;
[Constructible]

View file

@ -32,15 +32,15 @@ public partial class BaseTreasureChest : LockableContainer
}
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private TreasureLevel _level;
[SerializableField(1)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private TimeSpan _minSpawnTime;
[SerializableField(2)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private TimeSpan _maxSpawnTime;
[CommandProperty(AccessLevel.GameMaster)]

View file

@ -49,27 +49,27 @@ public abstract partial class LockableContainer : TrappableContainer, ILockable,
public Mobile Picker { get; set; }
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private bool _isShipwreckedItem;
[SerializableField(1)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private bool _trapOnLockpick;
[SerializableField(2)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _requiredSkill;
[SerializableField(3)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _maxLockLevel;
[SerializableField(4)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private uint _keyValue;
[SerializableField(5)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _lockLevel;
[SerializableProperty(6)]

View file

@ -20,15 +20,15 @@ public partial class MarkContainer : LockableContainer
}
[SerializableField(2)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private Map _targetMap;
[SerializableField(3)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private Point3D _target;
[SerializableField(4)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private string _description;
[Constructible]

View file

@ -11,12 +11,12 @@ public partial class StrongBox : BaseContainer, IChoppable
{
[InvalidateProperties]
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private Mobile _owner;
[InvalidateProperties]
[SerializableField(1)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private BaseHouse _house;
public StrongBox(Mobile owner, BaseHouse house) : base(0xE80)

View file

@ -16,15 +16,15 @@ public enum TrapType
public abstract partial class TrappableContainer : BaseContainer, ITelekinesisable
{
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _trapLevel;
[SerializableField(1)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _trapPower;
[SerializableField(2)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private TrapType _trapType;
public TrappableContainer(int itemID) : base(itemID)

View file

@ -16,20 +16,20 @@ public partial class TreasureMapChest : LockableContainer
private List<Mobile> _guardians;
[SerializableField(1)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private bool _temporary;
[SerializableField(2)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private Mobile _owner;
[SerializableField(3)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _level;
[TimerDrift]
[SerializableField(4)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private Timer _expireTimer;
[DeserializeTimerField(4)]
@ -43,7 +43,7 @@ public partial class TreasureMapChest : LockableContainer
[Tidy]
[SerializableField(5, setter: "private")]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private HashSet<Item> _lifted;
[Constructible]

View file

@ -13,7 +13,7 @@ public interface ICommodity /* added IsDeedable prop so expansion-based deedable
public partial class CommodityDeed : Item
{
[SerializableField(0, setter: "private")]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
public Item _commodity;
[Constructible]

View file

@ -12,12 +12,12 @@ public partial class DragonBardingDeed : Item, ICraftable
{
[InvalidateProperties]
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private string _craftedBy;
[InvalidateProperties]
[SerializableField(1)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private bool _exceptional;
public DragonBardingDeed() : base(0x14F0) => Weight = 1.0;

View file

@ -9,7 +9,7 @@ namespace Server.Items;
public partial class NewPlayerTicket : Item
{
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.Owner)]")]
[SerializedCommandProperty(AccessLevel.Owner)]
private Mobile _owner;
[Constructible]

View file

@ -21,11 +21,11 @@ public partial class VendorRentalContract : Item
private Timer _offerExpireTimer;
[SerializableField(1)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _price;
[SerializableField(2)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private bool _landlordRenew;
[Constructible]

View file

@ -220,11 +220,11 @@ public abstract partial class BaseBeverage : Item, IHasQuantity
private static readonly Dictionary<Mobile, Timer> m_Table = new();
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private Poison _poison;
[SerializableField(1)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private Mobile _poisoner;
public BaseBeverage() => ItemID = ComputeItemID();

View file

@ -7,7 +7,7 @@ namespace Server.Items;
public abstract partial class CookableFood : Item
{
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _cookingLevel;
public CookableFood(int itemID, int cookingLevel) : base(itemID) => _cookingLevel = cookingLevel;

View file

@ -8,15 +8,15 @@ namespace Server.Items;
public abstract partial class Food : Item
{
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private Mobile _poisoner;
[SerializableField(1)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private Poison _poison;
[SerializableField(2)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _fillFactor;
public Food(int itemID, int amount = 1) : base(itemID)

View file

@ -12,7 +12,7 @@ namespace Server.Items;
public abstract partial class BaseBoard : Container, ISecurable
{
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private SecureLevel _level;
public BaseBoard(int itemID) : base(itemID)

View file

@ -14,7 +14,7 @@ public partial class MahjongGame : Item, ISecurable
public const int BaseScore = 30000;
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private SecureLevel _level;
[SerializableField(1, setter: "private")]

View file

@ -13,17 +13,17 @@ public partial class Guildstone : Item, IAddon, IChoppable
{
[InvalidateProperties]
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private string _guildName;
[InvalidateProperties]
[SerializableField(1)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private string _guildAbbrev;
[InvalidateProperties]
[SerializableField(2, setter: "private")]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private Guild _guild;
public Guildstone(Guild g) : this(g, g.Name, g.Abbreviation)
@ -209,17 +209,17 @@ public partial class GuildstoneDeed : Item
{
[InvalidateProperties]
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private string _guildName;
[InvalidateProperties]
[SerializableField(1)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private string _guildAbbrev;
[InvalidateProperties]
[SerializableField(2, setter: "private")]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private Guild _guild;
[Constructible]

View file

@ -24,24 +24,24 @@ public abstract partial class BaseJewel : Item, ICraftable
[EncodedInt]
[InvalidateProperties]
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _maxHitPoints;
[SerializableField(3)]
[InvalidateProperties]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private GemType _gemType;
[SerializableField(4, setter: "private")]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster, canModify: true)]")]
[SerializedCommandProperty(AccessLevel.GameMaster, canModify: true)]
private AosAttributes _attributes;
[SerializableField(5, setter: "private")]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster, canModify: true)]")]
[SerializedCommandProperty(AccessLevel.GameMaster, canModify: true)]
private AosElementAttributes _resistances;
[SerializableField(6, setter: "private")]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster, canModify: true)]")]
[SerializedCommandProperty(AccessLevel.GameMaster, canModify: true)]
private AosSkillBonuses _skillBonuses;
public BaseJewel(int itemID, Layer layer) : base(itemID)

View file

@ -9,11 +9,11 @@ public abstract partial class BaseLight : Item
public static readonly bool Burnout = false;
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private bool _burntOut;
[SerializableField(3)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private bool _protected;
[TimerDrift]

View file

@ -7,7 +7,7 @@ namespace Server.Items;
public partial class Candelabra : BaseLight, IShipwreckedItem
{
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private bool _isShipwreckedItem;
[Constructible]

View file

@ -13,27 +13,27 @@ public partial class MapItem : Item, ICraftable
private const int MaxUserPins = 50;
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private Rectangle2D _bounds;
[SerializableField(1)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _width;
[SerializableField(2)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _height;
[SerializableField(3)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private bool _protected;
[SerializableField(4, setter: "private")]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private List<Point2D> _pins;
[SerializableField(5)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private Map _facet;
[SerializableField(6)]

View file

@ -32,31 +32,31 @@ public partial class TreasureMap : MapItem
[InvalidateProperties]
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private Mobile _completedBy;
[InvalidateProperties]
[SerializableField(1)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _level;
[InvalidateProperties]
[SerializableField(2)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private bool _completed;
[InvalidateProperties]
[SerializableField(3)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private Mobile _decoder;
[InvalidateProperties]
[SerializableField(4)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private Map _chestMap;
[SerializableField(5)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private Point2D _chestLocation;
[Constructible]

View file

@ -15,7 +15,7 @@ public partial class BankCheck : Item
{
[InvalidateProperties]
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _worth;
[Constructible]

View file

@ -51,12 +51,12 @@ public partial class BroadcastCrystal : Item
[InvalidateProperties]
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _charges;
[InvalidateProperties]
[SerializableField(1, getter: "private", setter: "private")]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private List<ReceiverCrystal> _receivers;
[Constructible]

View file

@ -12,11 +12,11 @@ public partial class DeceitBrazier : Item
private TimerExecutionToken _timerToken;
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _spawnRange;
[SerializableField(1)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private TimeSpan _nextSpawnDelay;
[Constructible]

View file

@ -24,15 +24,15 @@ public enum EffectTriggerType
public partial class EffectController : Item
{
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private TimeSpan _effectDelay;
[SerializableField(1)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private TimeSpan _triggerDelay;
[SerializableField(2)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private TimeSpan _soundDelay;
[SerializableField(3)]
@ -42,75 +42,75 @@ public partial class EffectController : Item
private IEntity _target;
[SerializableField(5)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private EffectController _sequence;
[SerializableField(6)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private bool _fixedDirection;
[SerializableField(7)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private bool _explodes;
[SerializableField(8)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private bool _playSoundAtTrigger;
[SerializableField(9)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private ECEffectType _effectType;
[SerializableField(10)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private EffectLayer _effectLayer;
[SerializableField(11)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private EffectTriggerType _triggerType;
[SerializableField(12)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _effectItemId;
[SerializableField(13)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _effectHue;
[SerializableField(14)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _renderMode;
[SerializableField(15)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _speed;
[SerializableField(16)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _duration;
[SerializableField(17)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _particleEffect;
[SerializableField(18)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _explodeParticleEffect;
[SerializableField(19)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _explodeSound;
[SerializableField(20)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _unknown;
[SerializableField(21)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _soundId;
[SerializableField(22)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _triggerRange;
[Constructible]

View file

@ -23,21 +23,21 @@ public interface ILockable
public partial class Key : Item
{
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _maxRange;
[SerializableField(1)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private Item _link;
[SerializableField(2)]
[InvalidateProperties]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private string _description;
[SerializableField(3)]
[InvalidateProperties]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private uint _keyValue;
[Constructible]

View file

@ -17,7 +17,7 @@ public partial class Moonstone : Item
{
[InvalidateProperties]
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private MoonstoneType _type;
[Constructible]

View file

@ -7,11 +7,11 @@ namespace Server.Items;
public partial class MorphItem : Item
{
[SerializableField(1)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _inactiveItemId;
[SerializableField(2)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _activeItemId;
[Constructible]

View file

@ -32,16 +32,16 @@ public partial class PlayerBBEast : BasePlayerBB
public abstract partial class BasePlayerBB : Item, ISecurable
{
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private SecureLevel _level;
[SerializableField(1)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private string _title;
[CanBeNull]
[SerializableField(2)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private PlayerBBMessage _greeting;
[SerializableField(3)]
@ -235,15 +235,15 @@ public abstract partial class BasePlayerBB : Item, ISecurable
public partial class PlayerBBMessage
{
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private DateTime _time;
[SerializableField(1)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private Mobile _poster;
[SerializableField(2)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private string _message;
public PlayerBBMessage()

View file

@ -7,15 +7,15 @@ namespace Server.Items;
public partial class SerpentPillar : Item
{
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private bool _active;
[SerializableField(1)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private string _word;
[SerializableField(2)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private Rectangle2D _destination;
[Constructible]

View file

@ -22,7 +22,7 @@ public partial class LocalizedStatic : Static
[EncodedInt]
[InvalidateProperties]
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _number;
[Constructible]

View file

@ -25,28 +25,28 @@ public partial class Teleporter : Item
{
[InvalidateProperties]
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private TeleporterFlags _flags;
[InvalidateProperties]
[SerializableField(1)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private TimeSpan _delay;
[EncodedInt]
[InvalidateProperties]
[SerializableField(2)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _soundID;
[InvalidateProperties]
[SerializableField(3)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private Point3D _pointDest;
[InvalidateProperties]
[SerializableField(4)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private Map _mapDest;
[Constructible]
@ -307,18 +307,18 @@ public partial class SkillTeleporter : Teleporter
{
[InvalidateProperties]
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private SkillName _skill;
[InvalidateProperties]
[SerializableField(1)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private double _required;
[CanBeNull]
[InvalidateProperties]
[SerializableField(2)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private TextDefinition _message;
[Constructible]
@ -423,15 +423,15 @@ public partial class SkillTeleporter : Teleporter
public partial class KeywordTeleporter : Teleporter
{
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private string _substring;
[SerializableField(1)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _keyword;
[SerializableField(2)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _range;
[Constructible]
@ -513,18 +513,18 @@ public partial class WaitTeleporter : KeywordTeleporter
[CanBeNull]
[InvalidateProperties]
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private TextDefinition _startMessage;
[CanBeNull]
[InvalidateProperties]
[SerializableField(1)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private TextDefinition _progressMessage;
[InvalidateProperties]
[SerializableField(2)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private bool _showTimeRemaining;
[Constructible]

View file

@ -11,7 +11,7 @@ public partial class WarningItem : Item
private bool m_Broadcasting;
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private TextDefinition _warningMessage;
// Field 1
@ -134,7 +134,7 @@ public partial class WarningItem : Item
public partial class HintItem : WarningItem
{
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private TextDefinition _hintMessage;
[Constructible]

View file

@ -8,7 +8,7 @@ namespace Server.Items;
public partial class WayPoint : Item
{
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private WayPoint _nextPoint;
[Constructible]

View file

@ -10,7 +10,7 @@ public abstract partial class BaseWindChimes : Item
{
[InvalidateProperties]
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private bool _turnedOn;
public BaseWindChimes(int itemID) : base(itemID)

View file

@ -6,7 +6,7 @@ namespace Server.Items
public abstract partial class BaseIngot : Item, ICommodity
{
[InvalidateProperties]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
[SerializableField(0)]
private CraftResource _resource;

View file

@ -18,7 +18,7 @@ namespace Server.Items
}
[InvalidateProperties]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
[SerializableField(0)]
private CraftResource _resource;

View file

@ -7,7 +7,7 @@ namespace Server.Items
public partial class BigFish : Item, ICarvable
{
[InvalidateProperties]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
[SerializableField(0)]
private Mobile _fisher;

View file

@ -6,7 +6,7 @@ namespace Server.Items
public abstract partial class BaseHides : Item, ICommodity
{
[InvalidateProperties]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
[SerializableField(0)]
private CraftResource _resource;

View file

@ -6,7 +6,7 @@ namespace Server.Items
public abstract partial class BaseLeather : Item, ICommodity
{
[InvalidateProperties]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
[SerializableField(0)]
private CraftResource _resource;

View file

@ -7,7 +7,7 @@ namespace Server.Items
public partial class Log : Item, ICommodity, IAxe
{
[InvalidateProperties]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
[SerializableField(0)]
private CraftResource _resource;

View file

@ -16,11 +16,11 @@ namespace Server.Items
public partial class DyeTub : Item, ISecurable
{
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private SecureLevel _level;
[SerializableField(1, isVirtual: true)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private bool _redyable;
[Constructible]

View file

@ -7,7 +7,7 @@ namespace Server.Items
public partial class FurnitureDyeTub : DyeTub, IRewardItem
{
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private bool _isRewardItem;
[Constructible]

View file

@ -7,7 +7,7 @@ namespace Server.Items
public partial class LeatherDyeTub : DyeTub, IRewardItem
{
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private bool _isRewardItem;
[Constructible]

View file

@ -7,7 +7,7 @@ namespace Server.Items
public partial class RewardBlackDyeTub : DyeTub, IRewardItem
{
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private bool _isRewardItem;
[Constructible]

View file

@ -7,7 +7,7 @@ namespace Server.Items
public partial class RunebookDyeTub : DyeTub, IRewardItem
{
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private bool _isRewardItem;
[Constructible]

View file

@ -7,7 +7,7 @@ namespace Server.Items
public partial class SpecialDyeTub : DyeTub, IRewardItem
{
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private bool _isRewardItem;
[Constructible]

View file

@ -7,7 +7,7 @@ namespace Server.Items
public partial class StatuetteDyeTub : DyeTub, IRewardItem
{
[SerializableField(0)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private bool _isRewardItem;
[Constructible]

View file

@ -26,12 +26,12 @@ namespace Server.Items
public abstract partial class BaseWand : BaseBashing
{
[InvalidateProperties]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
[SerializableField(0)]
private WandEffect _wandEffect;
[InvalidateProperties]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
[SerializableField(1)]
private int _charges;

View file

@ -18,12 +18,12 @@ namespace Server.Items
{
[SerializableField(0)]
[InvalidateProperties]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private bool _showUsesRemaining;
[SerializableField(1)]
[InvalidateProperties]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _usesRemaining;
public BaseAxe(int itemID) : base(itemID) => _usesRemaining = 150;

View file

@ -8,7 +8,7 @@ namespace Server.Items
{
[SerializableField(0)]
[InvalidateProperties]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _charges;
[Constructible]

View file

@ -12,12 +12,12 @@ namespace Server.Items
{
[SerializableField(0)]
[InvalidateProperties]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private bool _showUsesRemaining;
[SerializableField(1)]
[InvalidateProperties]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _usesRemaining;
public BasePoleArm(int itemID) : base(itemID) => _usesRemaining = 150;

View file

@ -11,12 +11,12 @@ namespace Server.Items
{
[SerializableField(0)]
[InvalidateProperties]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private bool _balanced;
[SerializableField(1)]
[InvalidateProperties]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _velocity;
private TimerExecutionToken _recoveryTimerToken;

View file

@ -74,28 +74,28 @@ public partial class RentedVendor : PlayerVendor
private int _rentalDurationId; // TODO: Replace this with something more robust
[SerializableField(1)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _rentalPrice;
[SerializableField(2)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private bool _landlordRenew;
[SerializableField(3)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private bool _renterRenew;
[SerializableField(4)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _renewalPrice;
[SerializableField(5)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private int _rentalGold;
[DeltaDateTime]
[SerializableField(6)]
[SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")]
[SerializedCommandProperty(AccessLevel.GameMaster)]
private DateTime _rentalExpireTime;
[CommandProperty(AccessLevel.GameMaster)]

View file

@ -37,8 +37,8 @@
<PackageReference Include="Argon2.Bindings" Version="1.14.4" />
<PackageReference Include="Zstd.Binaries" Version="1.5.1" />
<PackageReference Include="ModernUO.Serialization.Annotations" Version="2.5.3" />
<PackageReference Include="ModernUO.Serialization.Generator" Version="2.5.2" />
<PackageReference Include="ModernUO.Serialization.Annotations" Version="2.6.0" />
<PackageReference Include="ModernUO.Serialization.Generator" Version="2.6.0" />
</ItemGroup>
<ItemGroup>
<AdditionalFiles Include="Migrations/*.v*.json" />