Scripts/Accounting/Account.cs
/// <summary>
/// Deserializes a list of Mobile instances from an xml element.
/// </summary>
/// <param name="node">The XmlElement instance from which to deserialize.</param>
/// <returns>Mobile list. Value will never be null.</returns>
Deserializes a list of Mobile instances from an xml element.
Deserializes a list of Mobile instances from an xml element .
public static Mobile[] LoadMobiles( XmlElement node )
		{
			Mobile[] list = new Mobile[7];
			XmlElement chars = node["chars"];
			if ( chars != null )
			{
				foreach ( XmlElement ele in chars.GetElementsByTagName( "char" ) )
				{
					try
					{
						int index = Utility.GetXMLInt32( Utility.GetAttribute( ele, "index", "0" ), 0 );
						int serial = Utility.GetXMLInt32( Utility.GetText( ele, "0" ), 0 );
						if ( index >= 0 && index < list.Length )
							list[index] = World.FindMobile( serial );
					}
					catch
					{
					}
				}
			}
			return list;
		}
public static Mobile [ ] LoadMobiles ( XmlElement node ) { Mobile [ ] list = new Mobile [ 7 ] ; XmlElement chars = node [ " " ] ; if ( chars != null ) { foreach ( XmlElement ele in chars . GetElementsByTagName ( " " ) ) { try { int index = Utility . GetXMLInt32 ( Utility . GetAttribute ( ele , " " , " " ) , 0 ) ; int serial = Utility . GetXMLInt32 ( Utility . GetText ( ele , " " ) , 0 ) ; if ( index >= 0 && index < list . Length ) list [ index ] = World . FindMobile ( serial ) ; } catch { } } } return list ; }
Deserializes a list of Mobile instances from an xml element.
Deserializes a list of Mobile instances from an xml element .
//int length = Accounts.GetInt32( Accounts.GetAttribute( chars, "length", "6" ), 6 ); //list = new Mobile[length]; //Above is legacy, no longer used
Mobile list. Value will never be null.
Mobile list . Value will never be null .
node
XmlElement
The XmlElement instance from which to deserialize.
The XmlElement instance from which to deserialize .