This commit is contained in:
mark 2007-12-17 20:41:34 +00:00
parent 7ad00dceac
commit 0b4c3b15d9
41 changed files with 976 additions and 144 deletions

View file

@ -143,7 +143,7 @@ namespace Server.Commands
from.SendMessage( "Property ({0}) not found.", propName );
else if ( from.AccessLevel < attr.WriteLevel )
from.SendMessage( "Setting this property ({0}) requires at least {1} access level.", propName, Mobile.GetAccessLevelName( attr.WriteLevel ) );
else if ( !thisProp.CanWrite )
else if ( !thisProp.CanWrite || attr.ReadOnly )
from.SendMessage( "Property ({0}) is read only.", propName );
else
realProps[i] = thisProp;

View file

@ -135,7 +135,7 @@ namespace Server.Commands
failReason = String.Format( "Property '{0}' is write only.", propertyName );
return null;
}
else if ( (access & PropertyAccess.Write) != 0 && !p.CanWrite && isFinal )
else if ( (access & PropertyAccess.Write) != 0 && (!p.CanWrite || attr.ReadOnly) && isFinal )
{
failReason = String.Format( "Property '{0}' is read only.", propertyName );
return null;
@ -718,7 +718,7 @@ namespace Server
if ( ( access & PropertyAccess.Read ) != 0 && from.AccessLevel < security.ReadLevel )
throw new ReadAccessException( this, from.AccessLevel, security.ReadLevel );
if ( ( access & PropertyAccess.Write ) != 0 && from.AccessLevel < security.WriteLevel )
if ( ( access & PropertyAccess.Write ) != 0 && (from.AccessLevel < security.WriteLevel || security.ReadOnly) )
throw new WriteAccessException( this, from.AccessLevel, security.ReadLevel );
}