From 8ea42317788abc1c08cdefee695b74a0ac3092c9 Mon Sep 17 00:00:00 2001 From: Garry Newman Date: Wed, 8 May 2019 14:52:39 +0100 Subject: [PATCH] SteamInventory.TriggerItemDropAsync --- Facepunch.Steamworks/SteamInventory.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Facepunch.Steamworks/SteamInventory.cs b/Facepunch.Steamworks/SteamInventory.cs index affa5ae..1f6925e 100644 --- a/Facepunch.Steamworks/SteamInventory.cs +++ b/Facepunch.Steamworks/SteamInventory.cs @@ -317,5 +317,18 @@ public static bool GetAllItems() return await InventoryResult.GetAsync( sresult ); } + + /// + /// Trigger an item drop for this user. This is for timed drops. + /// + public static async Task TriggerItemDropAsync( InventoryDefId id ) + { + var sresult = default( SteamInventoryResult_t ); + + if ( !Internal.TriggerItemDrop( ref sresult, id ) ) + return null; + + return await InventoryResult.GetAsync( sresult ); + } } } \ No newline at end of file