Server.Network.ChangeCharacter.ChangeCharacter C# (CSharp) Méthode

ChangeCharacter() public méthode

public ChangeCharacter ( IAccount a ) : System
a IAccount
Résultat System
        public ChangeCharacter( IAccount a )
            : base(0x81)
        {
            this.EnsureCapacity( 305 );

            int count = 0;

            for ( int i = 0; i < a.Length; ++i )
            {
                if ( a[i] != null )
                    ++count;
            }

            m_Stream.Write( (byte) count );
            m_Stream.Write( (byte) 0 );

            for ( int i = 0; i < a.Length; ++i )
            {
                if ( a[i] != null )
                {
                    string name = a[i].Name;

                    if ( name == null )
                        name = "-null-";
                    else if ( (name = name.Trim()).Length == 0 )
                        name = "-empty-";

                    m_Stream.WriteAsciiFixed( name, 30 );
                    m_Stream.Fill( 30 ); // password
                }
                else
                {
                    m_Stream.Fill( 60 );
                }
            }
        }
ChangeCharacter