Beispiel #1
0
 public void Initiate(bool autoconnect, bool useCertificate, bool useLoginToken, VersionExtended version, string lang, List<System.Byte> credentials, short serverId, long sessionOptionalSalt, List<System.UInt16> failedAttempts)
 {
     m_autoconnect = autoconnect;
     m_useCertificate = useCertificate;
     m_useLoginToken = useLoginToken;
     m_version = version;
     m_lang = lang;
     m_credentials = credentials;
     m_serverId = serverId;
     m_sessionOptionalSalt = sessionOptionalSalt;
     m_failedAttempts = failedAttempts;
 }
Beispiel #2
0
 public override void Deserialize(BigEndianReader reader)
 {
     byte flag = reader.ReadByte();
     m_autoconnect = BooleanByteWrapper.GetFlag(flag, 0);
     m_useCertificate = BooleanByteWrapper.GetFlag(flag, 1);
     m_useLoginToken = BooleanByteWrapper.GetFlag(flag, 2);
     m_version = new VersionExtended();
     m_version.Deserialize(reader);
     m_lang = reader.ReadUTF();
     int credentialsCount = reader.ReadUShort();
     int credentialsIndex;
     m_credentials = new System.Collections.Generic.List<byte>();
     for (credentialsIndex = 0; (credentialsIndex < credentialsCount); credentialsIndex = (credentialsIndex + 1))
     {
         m_credentials.Add(reader.ReadByte());
     }
     m_serverId = reader.ReadShort();
     m_sessionOptionalSalt = reader.ReadVarLong();
     int failedAttemptsCount = reader.ReadUShort();
     int failedAttemptsIndex;
     m_failedAttempts = new System.Collections.Generic.List<ushort>();
     for (failedAttemptsIndex = 0; (failedAttemptsIndex < failedAttemptsCount); failedAttemptsIndex = (failedAttemptsIndex + 1))
     {
         m_failedAttempts.Add(reader.ReadVarUhShort());
     }
 }