@@ -3304,6 +3304,38 @@ public static void GetAssetsById(string[] assetIdsToRetrieve, Action<LootLockerA
3304
3304
LootLockerAPIManager . GetAssetsById ( data , onComplete ) ;
3305
3305
}
3306
3306
3307
+ /// <summary>
3308
+ /// Grant an Asset Instance to the Player's Inventory.
3309
+ /// </summary>
3310
+ /// <param name="assetID">The Asset you want to create an Instance of and give to the current player</param>
3311
+ public static void GrantAssetToPlayerInventory ( int assetID , Action < LootLockerGrantAssetResponse > onComplete )
3312
+ {
3313
+ GrantAssetToPlayerInventory ( assetID , null , null , onComplete ) ;
3314
+ }
3315
+
3316
+ /// <summary>
3317
+ /// Grant an Asset Instance to the Player's Inventory.
3318
+ /// </summary>
3319
+ /// <param name="assetID">The Asset you want to create an Instance of and give to the current player</param>
3320
+ /// <param name="assetVariationID">The id of the Asset Variation you want to grant</param>
3321
+ /// <param name="assetRentalOptionID">the rental option id you want to give the Asset Instance</param>
3322
+ /// <param name="onComplete">onComplete Action for handling the response of type LootLockerGrantAssetResponse</param>
3323
+ public static void GrantAssetToPlayerInventory ( int assetID , int ? assetVariationID , int ? assetRentalOptionID , Action < LootLockerGrantAssetResponse > onComplete )
3324
+ {
3325
+ if ( ! CheckInitialized ( ) )
3326
+ {
3327
+ onComplete ? . Invoke ( LootLockerResponseFactory . SDKNotInitializedError < LootLockerGrantAssetResponse > ( ) ) ;
3328
+ return ;
3329
+ }
3330
+
3331
+ LootLockerGrantAssetRequest data = new LootLockerGrantAssetRequest ( ) ;
3332
+ data . asset_id = assetID ;
3333
+ data . asset_variation_id = assetVariationID ;
3334
+ data . asset_rental_option_id = assetRentalOptionID ;
3335
+
3336
+ LootLockerAPIManager . GrantAssetToPlayerInventory ( data , onComplete ) ;
3337
+ }
3338
+
3307
3339
#endregion
3308
3340
3309
3341
#region AssetInstance
@@ -3524,6 +3556,24 @@ public static void OpenALootBoxForAssetInstances(int assetInstanceID, Action<Loo
3524
3556
data . getRequests . Add ( assetInstanceID . ToString ( ) ) ;
3525
3557
LootLockerAPIManager . OpenALootBox ( data , onComplete ) ;
3526
3558
}
3559
+
3560
+ /// <summary>
3561
+ /// Delete an Asset Instance from the current Player's Inventory.
3562
+ /// </summary>
3563
+ /// <param name="assetInstanceID">The asset instance ID of the you want to delete from the Players Inventory</param>
3564
+ /// <param name="onComplete">onComplete Action for handling the response of type LootLockerResponse</param>
3565
+ public static void DeleteAssetInstanceFromPlayerInventory ( int assetInstanceID , Action < LootLockerResponse > onComplete )
3566
+ {
3567
+ if ( ! CheckInitialized ( ) )
3568
+ {
3569
+ onComplete ? . Invoke ( LootLockerResponseFactory . SDKNotInitializedError < LootLockerResponse > ( ) ) ;
3570
+ return ;
3571
+ }
3572
+
3573
+ LootLockerGetRequest data = new LootLockerGetRequest ( ) ;
3574
+ data . getRequests . Add ( assetInstanceID . ToString ( ) ) ;
3575
+ LootLockerAPIManager . DeleteAssetInstanceFromPlayerInventory ( data , onComplete ) ;
3576
+ }
3527
3577
#endregion
3528
3578
3529
3579
#region AssetInstance progressions
@@ -4761,7 +4811,6 @@ public static void PickDropsFromDropTable(int[] picks, int tableInstanceId, Acti
4761
4811
LootLockerAPIManager . PickDropsFromDropTable ( data , tableInstanceId , onComplete ) ;
4762
4812
}
4763
4813
4764
-
4765
4814
#region Reports
4766
4815
4767
4816
/// <summary>
0 commit comments