Update to SteamKit 1.6.4

pull/8/head
Netshroud 10 years ago
parent ed44169956
commit c0b4dd03ee

@ -126,12 +126,10 @@ namespace DepotDownloader
SteamApps.PICSProductInfoCallback.PICSProductInfo package; SteamApps.PICSProductInfoCallback.PICSProductInfo package;
if ( steam3.PackageInfo.TryGetValue( license, out package ) && package != null ) if ( steam3.PackageInfo.TryGetValue( license, out package ) && package != null )
{ {
KeyValue root = package.KeyValues[license.ToString()]; if ( package.KeyValues["appids"].Children.Any( child => child.AsInteger() == depotId ) )
if ( root["appids"].Children.Any( child => child.AsInteger() == depotId ) )
return true; return true;
if ( root["depotids"].Children.Any( child => child.AsInteger() == depotId ) ) if ( package.KeyValues["depotids"].Children.Any( child => child.AsInteger() == depotId ) )
return true; return true;
} }
} }

@ -62,9 +62,9 @@
<SpecificVersion>True</SpecificVersion> <SpecificVersion>True</SpecificVersion>
<HintPath>..\packages\protobuf-net.2.0.0.668\lib\net40\protobuf-net.dll</HintPath> <HintPath>..\packages\protobuf-net.2.0.0.668\lib\net40\protobuf-net.dll</HintPath>
</Reference> </Reference>
<Reference Include="SteamKit2, Version=1.6.1.19114, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="SteamKit2, Version=1.6.4.32461, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <HintPath>..\packages\SteamKit2.1.6.4\lib\net40\SteamKit2.dll</HintPath>
<HintPath>..\packages\SteamKit2.1.6.1\lib\net40\SteamKit2.dll</HintPath> <Private>True</Private>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core"> <Reference Include="System.Core">

@ -1,15 +1,13 @@
using System; using SteamKit2;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using SteamKit2;
using System.Diagnostics;
using System.Net;
namespace DepotDownloader namespace DepotDownloader
{ {
class Steam3Session class Steam3Session
{ {
public class Credentials public class Credentials
@ -83,12 +81,12 @@ namespace DepotDownloader
this.callbacks = new CallbackManager(this.steamClient); this.callbacks = new CallbackManager(this.steamClient);
this.callbacks.Register(new Callback<SteamClient.ConnectedCallback>(ConnectedCallback)); this.callbacks.Subscribe<SteamClient.ConnectedCallback>(ConnectedCallback);
this.callbacks.Register(new Callback<SteamClient.DisconnectedCallback>(DisconnectedCallback)); this.callbacks.Subscribe<SteamClient.DisconnectedCallback>(DisconnectedCallback);
this.callbacks.Register(new Callback<SteamUser.LoggedOnCallback>(LogOnCallback)); this.callbacks.Subscribe<SteamUser.LoggedOnCallback>(LogOnCallback);
this.callbacks.Register(new Callback<SteamUser.SessionTokenCallback>(SessionTokenCallback)); this.callbacks.Subscribe<SteamUser.SessionTokenCallback>(SessionTokenCallback);
this.callbacks.Register(new Callback<SteamApps.LicenseListCallback>(LicenseListCallback)); this.callbacks.Subscribe<SteamApps.LicenseListCallback>(LicenseListCallback);
this.callbacks.Register(new Callback<SteamUser.UpdateMachineAuthCallback>(UpdateMachineAuthCallback)); this.callbacks.Subscribe<SteamUser.UpdateMachineAuthCallback>(UpdateMachineAuthCallback);
Console.Write( "Connecting to Steam3..." ); Console.Write( "Connecting to Steam3..." );
@ -160,7 +158,7 @@ namespace DepotDownloader
}; };
WaitUntilCallback(() => { WaitUntilCallback(() => {
new Callback<SteamApps.PICSTokensCallback>(cbMethodTokens, callbacks, steamApps.PICSGetAccessTokens(new List<uint>() { appId }, new List<uint>() { })); callbacks.Subscribe(steamApps.PICSGetAccessTokens(new List<uint>() { appId }, new List<uint>() { }), cbMethodTokens);
}, () => { return completed; }); }, () => { return completed; });
completed = false; completed = false;
@ -189,8 +187,8 @@ namespace DepotDownloader
request.Public = false; request.Public = false;
} }
WaitUntilCallback(() => { WaitUntilCallback(() => {
new Callback<SteamApps.PICSProductInfoCallback>(cbMethod, callbacks, steamApps.PICSGetProductInfo(new List<SteamApps.PICSRequest>() { request }, new List<SteamApps.PICSRequest>() { })); callbacks.Subscribe(steamApps.PICSGetProductInfo(new List<SteamApps.PICSRequest>() { request }, new List<SteamApps.PICSRequest>() { }), cbMethod);
}, () => { return completed; }); }, () => { return completed; });
} }
@ -219,8 +217,8 @@ namespace DepotDownloader
} }
}; };
WaitUntilCallback(() => { WaitUntilCallback(() => {
new Callback<SteamApps.PICSProductInfoCallback>(cbMethod, callbacks, steamApps.PICSGetProductInfo(new List<uint>(), packages)); callbacks.Subscribe(steamApps.PICSGetProductInfo(new List<uint>(), packages), cbMethod);
}, () => { return completed; }); }, () => { return completed; });
} }
@ -254,7 +252,7 @@ namespace DepotDownloader
}; };
WaitUntilCallback(() => { WaitUntilCallback(() => {
new Callback<SteamApps.AppOwnershipTicketCallback>(cbMethod, callbacks, steamApps.GetAppOwnershipTicket(appId)); callbacks.Subscribe(steamApps.GetAppOwnershipTicket(appId), cbMethod);
}, () => { return completed; }); }, () => { return completed; });
} }
@ -281,7 +279,7 @@ namespace DepotDownloader
WaitUntilCallback(() => WaitUntilCallback(() =>
{ {
new Callback<SteamApps.DepotKeyCallback>(cbMethod, callbacks, steamApps.GetDepotDecryptionKey(depotId, appid)); callbacks.Subscribe(steamApps.GetDepotDecryptionKey(depotId, appid), cbMethod);
}, () => { return completed; }); }, () => { return completed; });
} }
@ -307,7 +305,7 @@ namespace DepotDownloader
WaitUntilCallback(() => WaitUntilCallback(() =>
{ {
new Callback<SteamApps.CDNAuthTokenCallback>(cbMethod, callbacks, steamApps.GetCDNAuthToken(depotid, host)); callbacks.Subscribe(steamApps.GetCDNAuthToken(depotid, host), cbMethod);
}, () => { return completed; }); }, () => { return completed; });
} }

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="protobuf-net" version="2.0.0.668" targetFramework="net40" /> <package id="protobuf-net" version="2.0.0.668" targetFramework="net4" />
<package id="SteamKit2" version="1.6.3" targetFramework="net40" /> <package id="SteamKit2" version="1.6.4" targetFramework="net4" />
</packages> </packages>
Loading…
Cancel
Save