misc
This commit is contained in:
parent
27abe81af0
commit
35fc5ea566
2 changed files with 30 additions and 1 deletions
|
|
@ -526,6 +526,24 @@ namespace Server.Commands
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static string SetDirect( object obj, PropertyInfo prop, object toSet )
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if ( toSet is AccessLevel )
|
||||||
|
{
|
||||||
|
return "You do not have access to that level.";
|
||||||
|
}
|
||||||
|
|
||||||
|
prop.SetValue( obj, toSet, null );
|
||||||
|
return "Property has been set.";
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
return "An exception was caught, the property may not be set.";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static string InternalSetValue( Mobile from, object logobj, object o, PropertyInfo p, string pname, string value, bool shouldLog )
|
public static string InternalSetValue( Mobile from, object logobj, object o, PropertyInfo p, string pname, string value, bool shouldLog )
|
||||||
{
|
{
|
||||||
object toSet = null;
|
object toSet = null;
|
||||||
|
|
@ -536,6 +554,17 @@ namespace Server.Commands
|
||||||
|
|
||||||
return SetDirect( from, logobj, o, p, pname, toSet, shouldLog );
|
return SetDirect( from, logobj, o, p, pname, toSet, shouldLog );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static string InternalSetValue( object o, PropertyInfo p, string value )
|
||||||
|
{
|
||||||
|
object toSet = null;
|
||||||
|
string result = ConstructFromString( p.PropertyType, o, value, ref toSet );
|
||||||
|
|
||||||
|
if ( result != null )
|
||||||
|
return result;
|
||||||
|
|
||||||
|
return SetDirect( o, p, toSet );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -132,7 +132,7 @@ namespace Server.Engines.BulkOrders
|
||||||
from.SendGump( new BOBGump( (PlayerMobile)from, this ) );
|
from.SendGump( new BOBGump( (PlayerMobile)from, this ) );
|
||||||
|
|
||||||
dropped.Delete();
|
dropped.Delete();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue