diff --git a/Facepunch.Steamworks/Client/App.cs b/Facepunch.Steamworks/Client/App.cs index f448bf3..404887b 100644 --- a/Facepunch.Steamworks/Client/App.cs +++ b/Facepunch.Steamworks/Client/App.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; +using SteamNative; namespace Facepunch.Steamworks { @@ -12,6 +13,23 @@ public class App : IDisposable internal App( Client c ) { client = c; + + client.RegisterCallback( DlcInstalled ); + } + + public delegate void DlcInstalledDelegate( uint appid ); + + /// + /// Triggered after the current user gains ownership of DLC and that DLC is installed. + /// + public event DlcInstalledDelegate OnDlcInstalled; + + private void DlcInstalled( DlcInstalled_t data ) + { + if ( OnDlcInstalled != null ) + { + OnDlcInstalled( data.AppID ); + } } public void Dispose()