public void BnlsCreateAccountRequest(CreateAccountRequestToken requestToken) { if (!IsConnected) { Connect(); } BnlsPacket createAccount = new BnlsPacket(); createAccount.InsertString(requestToken.Username); createAccount.InsertString(requestToken.Password); SendPacket(0x04, createAccount); Receive(3, requestToken); }
public void BnlsLogonChallengeRequest(LogonChallengeRequestToken requestToken) { if (!IsConnected) { Connect(); } if (((BnetProduct)requestToken.Product) == BnetProduct.Warcraft3) { BnlsPacket chooseNlsRevision = new BnlsPacket(); chooseNlsRevision.InsertInt32(0x02); SendPacket(0x0D, chooseNlsRevision); Receive(3, requestToken); } BnlsPacket logonChallenge = new BnlsPacket(); logonChallenge.InsertString(requestToken.Username); logonChallenge.InsertString(requestToken.Password); SendPacket(0x02, logonChallenge); Receive(3, requestToken); }
public void BnlsVersionCheckRequest(VersionCheckRequestToken requestToken) { if (!IsConnected) { Connect(); } BnlsPacket versionCheckEx2 = new BnlsPacket(); versionCheckEx2.InsertInt32(requestToken.Product); // Product versionCheckEx2.InsertInt32(0); // Flags versionCheckEx2.InsertInt32(Environment.TickCount); // Cookie - unused versionCheckEx2.InsertInt64(requestToken.FileTime); // Filetime versionCheckEx2.InsertString(requestToken.VersionName); // Version file name versionCheckEx2.InsertBytes(requestToken.ChecksumFormula); // Checksum Formula versionCheckEx2.InsertByte(0x00); System.Diagnostics.Debug.WriteLine("Checksum Form"); DataFormatter.WriteToTrace(requestToken.ChecksumFormula); SendPacket(0x1A, versionCheckEx2); // BNLS_VERSIONCHECK Receive(3, requestToken); }