From 04ad04f95dc82b323752bff6bac11d7e74ef4284 Mon Sep 17 00:00:00 2001 From: Garry Newman Date: Wed, 4 Dec 2019 11:15:58 +0000 Subject: [PATCH] Added SteamServer.UserHasLicenseForApp --- Facepunch.Steamworks/Generated/SteamEnums.cs | 6 +++--- Facepunch.Steamworks/SteamServer.cs | 8 ++++++++ Generator/Cleanup.cs | 1 + 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Facepunch.Steamworks/Generated/SteamEnums.cs b/Facepunch.Steamworks/Generated/SteamEnums.cs index 262f8a5..2076b6b 100644 --- a/Facepunch.Steamworks/Generated/SteamEnums.cs +++ b/Facepunch.Steamworks/Generated/SteamEnums.cs @@ -211,7 +211,7 @@ public enum AuthResponse : int // // EUserHasLicenseForAppResult // - internal enum UserHasLicenseForAppResult : int + public enum UserHasLicenseForAppResult : int { HasLicense = 0, DoesNotHaveLicense = 1, @@ -580,7 +580,7 @@ public enum FriendState : int LookingToPlay = 6, Invisible = 7, Max = 8, - } + } // // EFriendFlags @@ -600,7 +600,7 @@ public enum FriendFlags : int ChatMember = 4096, All = 65535, } - + // // EUserRestriction // diff --git a/Facepunch.Steamworks/SteamServer.cs b/Facepunch.Steamworks/SteamServer.cs index 0fe0562..028a681 100644 --- a/Facepunch.Steamworks/SteamServer.cs +++ b/Facepunch.Steamworks/SteamServer.cs @@ -464,6 +464,14 @@ public static unsafe void HandleIncomingPacket( byte[] data, int size, uint addr public static unsafe void HandleIncomingPacket( IntPtr ptr, int size, uint address, ushort port ) { Internal.HandleIncomingPacket( ptr, size, address, port ); + } + + /// + /// Does the user own this app (which could be DLC) + /// + public static UserHasLicenseForAppResult UserHasLicenseForApp( SteamId steamid, AppId appid ) + { + return Internal.UserHasLicenseForApp( steamid, appid ); } } } \ No newline at end of file diff --git a/Generator/Cleanup.cs b/Generator/Cleanup.cs index eecf489..fd0ccd2 100644 --- a/Generator/Cleanup.cs +++ b/Generator/Cleanup.cs @@ -87,6 +87,7 @@ internal static string Expose( string name ) if ( name == "P2PSessionError" ) return "public"; if ( name == "InputType" ) return "public"; if ( name == "InputSourceMode" ) return "public"; + if ( name == "UserHasLicenseForAppResult" ) return "public"; return "internal"; }