From b2cb33aa920689d899b3e08fbc50270f7c7e1388 Mon Sep 17 00:00:00 2001 From: Ryan Stecker Date: Sun, 26 Feb 2012 12:13:45 -0600 Subject: [PATCH] Updated depotdownloader to pass in the appid when requesting a depot key. --- DepotDownloader/ContentDownloader.cs | 6 +++--- DepotDownloader/Program.cs | 4 ++-- DepotDownloader/Steam3Session.cs | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/DepotDownloader/ContentDownloader.cs b/DepotDownloader/ContentDownloader.cs index 80476a4..3631bf6 100644 --- a/DepotDownloader/ContentDownloader.cs +++ b/DepotDownloader/ContentDownloader.cs @@ -390,11 +390,11 @@ namespace DepotDownloader return; } - DownloadDepot(depot, appId, depotVersion); + DownloadDepot(depot, depotVersion, appId); } } - public static void DownloadDepot(int depotId, int appId, int depotVersionRequested) + public static void DownloadDepot(int depotId, int depotVersionRequested, int appId = 0 ) { if(steam3 != null && appId > 0) steam3.RequestAppInfo((uint)appId); @@ -437,7 +437,7 @@ namespace DepotDownloader return; } - steam3.RequestDepotKey((uint)depotId); + steam3.RequestDepotKey( ( uint )depotId, ( uint )appId ); byte[] depotKey = steam3.DepotKeys[(uint)depotId]; DownloadSteam3(depotId, manifestID, depotKey, installDir); diff --git a/DepotDownloader/Program.cs b/DepotDownloader/Program.cs index aca3826..1708226 100644 --- a/DepotDownloader/Program.cs +++ b/DepotDownloader/Program.cs @@ -179,7 +179,7 @@ namespace DepotDownloader } else if ( !bGameserver ) { - ContentDownloader.DownloadDepot(depotId, appId, depotVersion); + ContentDownloader.DownloadDepot(depotId, depotVersion, appId); } else { @@ -219,7 +219,7 @@ namespace DepotDownloader return; } - ContentDownloader.DownloadDepot(currentDepotId, -1, depotVersion); + ContentDownloader.DownloadDepot(currentDepotId, depotVersion); } } diff --git a/DepotDownloader/Steam3Session.cs b/DepotDownloader/Steam3Session.cs index 6f0e6c8..42cded7 100644 --- a/DepotDownloader/Steam3Session.cs +++ b/DepotDownloader/Steam3Session.cs @@ -167,7 +167,7 @@ namespace DepotDownloader } } - public void RequestDepotKey(uint depotId) + public void RequestDepotKey(uint depotId, uint appid = 0) { if (DepotKeys.ContainsKey(depotId) || bAborted) return; @@ -185,13 +185,13 @@ namespace DepotDownloader DepotKeys[depotKey.DepotID] = depotKey.DepotKey; }; - using (JobCallback depotKeyCallback = new JobCallback(cbMethod, callbacks, steamApps.GetDepotDecryptionKey(depotId))) + using ( var depotKeyCallback = new JobCallback( cbMethod, callbacks, steamApps.GetDepotDecryptionKey( depotId, appid ) ) ) { do { WaitForCallbacks(); } - while (!depotKeyCallback.Completed && !bAborted); + while ( !depotKeyCallback.Completed && !bAborted ); } }