Merge pull request #46 from richdog/master

Made changes surrounding OnItemInstalled and OnFileDownloaded events in Workshop.cs
This commit is contained in:
Garry Newman 2017-07-26 17:12:56 +01:00 committed by GitHub
commit 6c4296a0fc

View File

@ -29,8 +29,7 @@ public partial class Workshop : IDisposable
/// <summary>
/// Called when an item has been downloaded. This could have been
/// because of a call to Download or because of a subscription triggered
/// via the browser/app.
/// because of a call to Download.
/// </summary>
public event Action<ulong, Callbacks.Result> OnFileDownloaded;
@ -39,7 +38,7 @@ public partial class Workshop : IDisposable
/// because of a call to Download or because of a subscription triggered
/// via the browser/app.
/// </summary>
internal event Action<ulong> OnItemInstalled;
public event Action<ulong> OnItemInstalled;
internal Workshop( BaseSteamworks steamworks, SteamNative.SteamUGC ugc, SteamNative.SteamRemoteStorage remoteStorage )
{
@ -67,7 +66,7 @@ public void Dispose()
private void onItemInstalled( SteamNative.ItemInstalled_t obj, bool failed )
{
if ( OnItemInstalled != null )
if ( OnItemInstalled != null && obj.AppID == Client.Instance.AppId )
OnItemInstalled( obj.PublishedFileId );
}