public static OutgoingAuthenticationPacket BuildAuthenticationLogOnProofSuccess(BigInteger serverSessionKeyProof, bool doHardwareSurvery = false) { Contract.Requires(serverSessionKeyProof != null); Contract.Requires(serverSessionKeyProof.ByteLength == 20); Contract.Ensures(Contract.Result <OutgoingAuthenticationPacket>() != null); var packet = new OutgoingAuthenticationPacket(GruntOpCode.AuthenticationLogOnProof); packet.Write((byte)AuthenticationResult.Success); packet.Write(serverSessionKeyProof, Password.SHA1Length); // Game account flags. Only These are checked: // 0x1 = ? // 0x8 = Trial Account // 0x800000 = ? packet.Write(0x00800000); packet.Write(doHardwareSurvery.AsConvertible().ToInt32(null)); // If 1, client will fire EVENT_ACCOUNT_MESSAGES_AVAILABLE. packet.Write((short)0); return(packet); }