Server.Commands.Add.Build C# (CSharp) Méthode

Build() public static méthode

public static Build ( Server.Mobile from, ConstructorInfo ctor, object values, string props, PropertyInfo realProps, bool &sendError ) : IEntity
from Server.Mobile
ctor System.Reflection.ConstructorInfo
values object
props string
realProps System.Reflection.PropertyInfo
sendError bool
Résultat IEntity
		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;
		}

Same methods

Add::Build ( Server.Mobile from, Server.Point3D start, Server.Point3D end, ConstructorInfo ctor, object values, string props, PropertyInfo realProps, List packs ) : int
Add::Build ( Server.Mobile from, Server.Point3D start, Server.Point3D end, ConstructorInfo ctor, object values, string props, PropertyInfo realProps, List packs, bool outline, bool mapAvg ) : int