public static IEntity Build( Mobile from, ConstructorInfo ctor, object[] values, string[,] props, PropertyInfo[] realProps, ref bool sendError )
{
object built = ctor.Invoke( values );
if ( built != null && realProps != null )
{
bool hadError = false;
for ( int i = 0; i < realProps.Length; ++i )
{
if ( realProps[i] == null )
continue;
string result = Properties.InternalSetValue( from, built, built, realProps[i], props[i, 1], props[i, 1], false );
if ( result != "Property has been set." )
{
if ( sendError )
from.SendMessage( result );
hadError = true;
}
}
if ( hadError )
sendError = false;
}
return (IEntity)built;
}