From 5c355296fad0a2551a0b6fd3c7b54619405a1018 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikkel=20S=C3=B8rensen?= Date: Thu, 16 Nov 2023 12:17:43 +0100 Subject: [PATCH] Overwrite method for purchasing a single catalog item --- Runtime/Game/LootLockerSDKManager.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Runtime/Game/LootLockerSDKManager.cs b/Runtime/Game/LootLockerSDKManager.cs index 80795a1a..7d269bbc 100644 --- a/Runtime/Game/LootLockerSDKManager.cs +++ b/Runtime/Game/LootLockerSDKManager.cs @@ -4414,6 +4414,25 @@ public static void ActivateRentalAsset(int assetInstanceID, Action + /// Purchase one catalog item using a specified wallet + /// + /// The id of the wallet to use for the purchase + /// The id of the item that you want to purchase + /// The amount that you want to purchase the item + /// onComplete Action for handling the response + public static void LootLockerPurchaseSingleCatalogItem(string walletID, string itemID, int quantity, Action onComplete) + { + LootLockerCatalogItemAndQuantityPair item = new LootLockerCatalogItemAndQuantityPair(); + + item.catalog_listing_id = itemID; + item.quantity = quantity; + + LootLockerCatalogItemAndQuantityPair[] items = { item }; + + LootLockerPurchaseCatalogItems(walletID, items, onComplete); + } + /// /// Purchase one or more catalog items using a specified wallet ///