Skip to content

Commit 5c35529

Browse files
Mikkel Sørensenkirre-bylund
authored andcommitted
Overwrite method for purchasing a single catalog item
1 parent a314676 commit 5c35529

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

Runtime/Game/LootLockerSDKManager.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4414,6 +4414,25 @@ public static void ActivateRentalAsset(int assetInstanceID, Action<LootLockerAct
44144414
LootLockerAPIManager.ActivateRentalAsset(data, onComplete);
44154415
}
44164416

4417+
/// <summary>
4418+
/// Purchase one catalog item using a specified wallet
4419+
/// </summary>
4420+
/// <param name="walletID">The id of the wallet to use for the purchase</param>
4421+
/// <param name="itemID">The id of the item that you want to purchase</param>
4422+
/// <param name="quantity">The amount that you want to purchase the item </param>
4423+
/// <param name="onComplete">onComplete Action for handling the response</param>
4424+
public static void LootLockerPurchaseSingleCatalogItem(string walletID, string itemID, int quantity, Action<LootLockerPurchaseCatalogItemResponse> onComplete)
4425+
{
4426+
LootLockerCatalogItemAndQuantityPair item = new LootLockerCatalogItemAndQuantityPair();
4427+
4428+
item.catalog_listing_id = itemID;
4429+
item.quantity = quantity;
4430+
4431+
LootLockerCatalogItemAndQuantityPair[] items = { item };
4432+
4433+
LootLockerPurchaseCatalogItems(walletID, items, onComplete);
4434+
}
4435+
44174436
/// <summary>
44184437
/// Purchase one or more catalog items using a specified wallet
44194438
/// </summary>

0 commit comments

Comments
 (0)