diff --git a/Projects/Server/Attributes.cs b/Projects/Server/Attributes.cs index daab18e7e..ffdad7c59 100644 --- a/Projects/Server/Attributes.cs +++ b/Projects/Server/Attributes.cs @@ -145,16 +145,18 @@ public class CommandPropertyAttribute : Attribute AccessLevel level, bool readOnly = false, bool canModify = false - ) : this(level, level) + ) : this(level, level, readOnly, canModify) { - ReadOnly = readOnly; - CanModify = canModify; } - public CommandPropertyAttribute(AccessLevel readLevel, AccessLevel writeLevel) + public CommandPropertyAttribute( + AccessLevel readLevel, AccessLevel writeLevel, bool readOnly = false, bool canModify = false + ) { ReadLevel = readLevel; WriteLevel = writeLevel; + ReadOnly = readOnly; + CanModify = canModify; } public AccessLevel ReadLevel { get; } @@ -170,16 +172,18 @@ public class SerializedCommandPropertyAttribute : SerializedPropertyAttrAttribut AccessLevel level, bool readOnly = false, bool canModify = false - ) : this(level, level) + ) : this(level, level, readOnly, canModify) { - ReadOnly = readOnly; - CanModify = canModify; } - public SerializedCommandPropertyAttribute(AccessLevel readLevel, AccessLevel writeLevel) + public SerializedCommandPropertyAttribute( + AccessLevel readLevel, AccessLevel writeLevel, bool readOnly = false, bool canModify = false + ) { ReadLevel = readLevel; WriteLevel = writeLevel; + ReadOnly = readOnly; + CanModify = canModify; } public AccessLevel ReadLevel { get; } diff --git a/Projects/Server/Mobiles/Mobile.cs b/Projects/Server/Mobiles/Mobile.cs index a3cd7620d..5b4e7a992 100644 --- a/Projects/Server/Mobiles/Mobile.cs +++ b/Projects/Server/Mobiles/Mobile.cs @@ -895,7 +895,7 @@ public partial class Mobile : IHued, IComparable, ISpawnable, IObjectPro [CommandProperty(AccessLevel.Administrator)] public bool AutoPageNotify { get; set; } - [CommandProperty(AccessLevel.GameMaster, AccessLevel.Owner)] + [CommandProperty(AccessLevel.GameMaster, AccessLevel.Administrator, canModify: true)] public IAccount Account { get; set; } [CommandProperty(AccessLevel.GameMaster)] diff --git a/Projects/UOContent/Accounting/Account.cs b/Projects/UOContent/Accounting/Account.cs index 9e554fd72..c9e85de2c 100644 --- a/Projects/UOContent/Accounting/Account.cs +++ b/Projects/UOContent/Accounting/Account.cs @@ -13,6 +13,7 @@ using Server.Network; namespace Server.Accounting; +[PropertyObject] [SerializationGenerator(6)] public partial class Account : IAccount, IComparable {