LootLocker Unreal Server SDK 6.7.1
Server-side backend SDK for Unreal Engine
Loading...
Searching...
No Matches
LootLockerServerItemRequestHandler.h
Go to the documentation of this file.
1// Copyright (c) 2021 LootLocker
2
3#pragma once
4
5#include "CoreMinimal.h"
8
9#include "LootLockerServerItemRequestHandler.generated.h"
10
11//==================================================
12// Enum Definitions
13//==================================================
14
15UENUM(BlueprintType, Category = "LootLockerServer")
19enum class ELootLockerServerItemType : uint8
20{
22 Unknown = 0,
24 Instanced = 1,
26 Stackable = 2,
27};
28
29UENUM(BlueprintType, Category = "LootLockerServer")
34{
36 Unknown = 0,
38 Asset = 1,
44 Currency = 4,
46 Group = 5,
48 Reward = 6,
50 Platform_key = 7,
56 Player_metadata = 10,
58 File = 11,
60 Discord_role = 12,
62 Item_template = 13,
63};
64
65//==================================================
66// Data Type Definitions
67//==================================================
68
72USTRUCT(BlueprintType)
74{
75 GENERATED_BODY()
79 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
80 FString Id;
84 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
85 FString Name;
89 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
90 int Limited = 0;
94 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
99 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
100 bool Consumable = false;
104 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
105 bool Deletable = false;
109 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
110 FDateTime Created_at = FDateTime(0);
114 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
115 FDateTime Updated_at = FDateTime(0);
116};
117
133USTRUCT(BlueprintType)
135{
136 GENERATED_BODY()
140 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
141 FString Id;
145 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
146 int Player_id = 0;
150 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
151 FString Item_template_id;
155 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
160 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
161 bool Consumable = false;
165 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
166 int Count = 0;
170 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
171 FString Source;
175 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
176 FDateTime Created_at = FDateTime(0);
180 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
181 FDateTime Updated_at = FDateTime(0);
189 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
191};
192
193//==================================================
194// Response Type Definitions
195//==================================================
196
200USTRUCT(BlueprintType)
202{
203 GENERATED_BODY()
207 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
212 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
214};
215
221USTRUCT(BlueprintType)
223{
224 GENERATED_BODY()
228 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
229 FString Id;
233 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
234 int Player_id = 0;
238 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
239 FString Item_template_id;
243 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
248 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
249 bool Consumable = false;
253 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
254 int Count = 0;
258 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
259 FString Source;
263 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
264 FDateTime Created_at = FDateTime(0);
268 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
269 FDateTime Updated_at = FDateTime(0);
275 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
280 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
282};
283
287USTRUCT(BlueprintType)
292
297USTRUCT(BlueprintType)
299{
300 GENERATED_BODY()
304 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
305 FString Source_id;
309 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
310 int Count = 0;
314 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
319 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
320 FString Name;
324 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
325 FString Code;
326};
327
331USTRUCT(BlueprintType)
333{
334 GENERATED_BODY()
338 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
339 FString Id;
343 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
344 TArray<FLootLockerServerGrantedItem> Behaviour_results;
345};
346
350USTRUCT(BlueprintType)
352{
353 GENERATED_BODY()
357 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
358 FString Id;
359};
360
365USTRUCT(BlueprintType)
370
371//==================================================
372// Request Type Definitions
373//==================================================
374
378USTRUCT(BlueprintType)
380{
381 GENERATED_BODY()
385 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
386 FString Item_template_id;
390 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
391 int Count = 1;
395 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
396 FString Source;
397};
398
402USTRUCT(BlueprintType)
404{
405 GENERATED_BODY()
409 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
410 int Count = 0;
411};
412
416USTRUCT(BlueprintType)
418{
419 GENERATED_BODY()
423 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
424 FString Source_inventory_id;
428 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "LootLockerServer")
429 FString Target_inventory_id;
430};
431
432//==================================================
433// C++ Delegate Definitions
434//==================================================
435
436/*
437 C++ response delegate for listing a player's items
438 */
440/*
441 C++ response delegate for getting a player item
442 */
444/*
445 C++ response delegate for deleting a player item
446 */
448/*
449 C++ response delegate for granting an item to a player
450 */
452/*
453 C++ response delegate for splitting a player item stack
454 */
456/*
457 C++ response delegate for merging player item stacks
458 */
460
464UCLASS()
465class LOOTLOCKERSERVERSDK_API ULootLockerServerItemRequestHandler : public UObject
466{
467 GENERATED_BODY()
468 public:
470
471 static FString ListPlayerInventoryItems(int PlayerID, int Page, int PerPage, const FLootLockerServerListPlayerInventoryItemsResponseDelegate& OnCompletedRequest);
472 static FString GetPlayerInventoryItem(int PlayerID, const FString& InventoryId, const FLootLockerServerGetPlayerInventoryItemResponseDelegate& OnCompletedRequest);
473 static FString DeletePlayerInventoryItem(int PlayerID, const FString& InventoryId, const FLootLockerServerDeletePlayerInventoryItemResponseDelegate& OnCompletedRequest);
474 static FString GrantItemToPlayerInventory(int PlayerID, const FLootLockerServerGrantItemRequest& Request, const FLootLockerServerGrantItemResponseDelegate& OnCompletedRequest);
475 static FString SplitPlayerInventoryItemStack(int PlayerID, const FString& InventoryId, const FLootLockerServerSplitInventoryItemRequest& Request, const FLootLockerServerSplitPlayerInventoryItemStackResponseDelegate& OnCompletedRequest);
477};
ELootLockerServerItemType
The type of an item, determining whether item instances are stackable or individually tracked.
Definition LootLockerServerItemRequestHandler.h:20
@ Stackable
The item is stored as a single entry with a count that can be incremented or decremented.
@ Instanced
Each granted item is a separate, individually tracked instance.
@ Unknown
The item type could not be determined.
void(* FLootLockerServerSplitPlayerInventoryItemStackResponseDelegate)(FLootLockerServerSplitPlayerInventoryItemStackResponse)
Definition LootLockerServerItemRequestHandler.h:455
void(* FLootLockerServerListPlayerInventoryItemsResponseDelegate)(FLootLockerServerListPlayerInventoryItemsResponse)
Definition LootLockerServerItemRequestHandler.h:439
void(* FLootLockerServerDeletePlayerInventoryItemResponseDelegate)(FLootLockerServerDeletePlayerInventoryItemResponse)
Definition LootLockerServerItemRequestHandler.h:447
void(* FLootLockerServerMergePlayerInventoryItemStacksResponseDelegate)(FLootLockerServerMergePlayerInventoryItemStacksResponse)
Definition LootLockerServerItemRequestHandler.h:459
void(* FLootLockerServerGetPlayerInventoryItemResponseDelegate)(FLootLockerServerGetPlayerInventoryItemResponse)
Definition LootLockerServerItemRequestHandler.h:443
ELootLockerServerRewardKind
The kind of reward that was granted as a result of a behaviour.
Definition LootLockerServerItemRequestHandler.h:34
@ Item_template
An item template.
@ Publisher_progression_points
Publisher progression points.
@ Discord_role
A Discord role.
@ Progression_points
Progression points.
@ Progression_reset
A progression reset.
@ Player_metadata
Player metadata.
@ Publisher_currency
A publisher currency.
@ Platform_key
A platform key.
void(* FLootLockerServerGrantItemResponseDelegate)(FLootLockerServerGrantItemResponse)
Definition LootLockerServerItemRequestHandler.h:451
Handler for the Items & Item Templates server endpoints.
Definition LootLockerServerItemRequestHandler.h:466
static FString SplitPlayerInventoryItemStack(int PlayerID, const FString &InventoryId, const FLootLockerServerSplitInventoryItemRequest &Request, const FLootLockerServerSplitPlayerInventoryItemStackResponseDelegate &OnCompletedRequest)
static FString MergePlayerInventoryItemStacks(int PlayerID, const FLootLockerServerMergeInventoryItemsRequest &Request, const FLootLockerServerMergePlayerInventoryItemStacksResponseDelegate &OnCompletedRequest)
static FString GetPlayerInventoryItem(int PlayerID, const FString &InventoryId, const FLootLockerServerGetPlayerInventoryItemResponseDelegate &OnCompletedRequest)
static FString ListPlayerInventoryItems(int PlayerID, int Page, int PerPage, const FLootLockerServerListPlayerInventoryItemsResponseDelegate &OnCompletedRequest)
static FString DeletePlayerInventoryItem(int PlayerID, const FString &InventoryId, const FLootLockerServerDeletePlayerInventoryItemResponseDelegate &OnCompletedRequest)
static FString GrantItemToPlayerInventory(int PlayerID, const FLootLockerServerGrantItemRequest &Request, const FLootLockerServerGrantItemResponseDelegate &OnCompletedRequest)
The template an item instance (player inventory item) is based on.
Definition LootLockerServerItemRequestHandler.h:74
Response for deleting a player item.
Definition LootLockerServerItemRequestHandler.h:289
Definition LootLockerServerResponse.h:168
Response for getting a single player item Note: The backend returns the item fields at the top level ...
Definition LootLockerServerItemRequestHandler.h:223
Request body for granting an item to a player.
Definition LootLockerServerItemRequestHandler.h:380
Response for granting an item to a player.
Definition LootLockerServerItemRequestHandler.h:333
A single result produced by a grant behaviour (e.g.
Definition LootLockerServerItemRequestHandler.h:299
A single item instance in a player's inventory.
Definition LootLockerServerItemRequestHandler.h:135
Response for listing a player's items.
Definition LootLockerServerItemRequestHandler.h:202
Request body for merging player item stacks.
Definition LootLockerServerItemRequestHandler.h:418
Response for merging player item stacks Note: This endpoint returns 204 No Content.
Definition LootLockerServerItemRequestHandler.h:367
Definition LootLockerServerMetadataRequest.h:104
The base response for all LootLocker Server responses.
Definition LootLockerServerResponse.h:67
Request body for splitting a player item stack.
Definition LootLockerServerItemRequestHandler.h:404
Response for splitting a player item stack.
Definition LootLockerServerItemRequestHandler.h:352