/// <summary> /// Creates a Version 2 Battle.net FTP request specifically for banner ad downloads. /// </summary> /// <param name="product">The product being emulated by this request.</param> /// <param name="fileName">The full or relative path to the file as it is to be stored on the local /// machine. The name portion of the file must be the filename being requested from the service.</param> /// <param name="fileTime">The last-write time of the file. If the file is not available, this parameter /// can be <b>null</b> (<b>Nothing</b> in Visual Basic).</param> /// <param name="cdKey">The CD key of the client being emulated.</param> /// <param name="adId">The banner ID provided by Battle.net's ad notice message.</param> /// <param name="adFileExtension">The banner filename extension provided by Battle.net's ad notice message.</param> /// <remarks> /// <para>Although it is not specifically required to download banner ads, it is recommended for forward-compatibility /// with the Battle.net protocol that this constructor is used.</para> /// </remarks> public BnFtpVersion2Request(string fileName, ClassicProduct product, DateTime fileTime, CdKey cdKey, int adId, string adFileExtension) : this(fileName, product, fileTime, cdKey) { _ad = true; _adId = adId; _adExt = adFileExtension; }
/// <summary> /// Creates a standard Version 2 Battle.net FTP request. /// </summary> /// <param name="product">The product being emulated by this request.</param> /// <param name="fileName">The full or relative path to the file as it is to be stored on the local /// machine. The name portion of the file must be the filename being requested from the service.</param> /// <param name="fileTime">The last-write time of the file. If the file is not available, this parameter /// can be <b>null</b> (<b>Nothing</b> in Visual Basic).</param> /// <param name="cdKey">The CD key of the client being emulated.</param> public BnFtpVersion2Request(string fileName, ClassicProduct product, DateTime fileTime, CdKey cdKey) : base(fileName, product, fileTime) { string prod = Product.ProductCode; if (prod != "WAR3" && prod != "W3XP") throw new ArgumentOutOfRangeException("product", product, "Only Warcraft III clients are valid for Battle.net version 2 FTP requests."); if (!cdKey.IsValid) throw new ArgumentException("The specified CD key is not valid.", "cdKey"); _key = cdKey; }
public BattleNetSettings() { Console.Write("Username: "******"Password: "******"CD Key: "); CdKey1 = new CdKey(Console.ReadLine()); Client = ClassicProduct.StarcraftRetail; VersionByte = 0xd3; GameExe = @"C:\GameFiles\STAR\Starcraft.exe"; GameFile2 = @"C:\GameFiles\STAR\Storm.dll"; GameFile3 = @"C:\GameFiles\STAR\Battle.snp"; ImageFile = @"C:\GameFiles\STAR\STAR.bin"; Gateway = Gateway.USEast; CdKeyOwner = Username; PingMethod = PingKind.ReplyBeforeVersioning; }