Space Plunder
Loading...
Searching...
No Matches
GetStoredStats.h
Go to the documentation of this file.
1// Copyright 2021 Artur 'NijoMeisteR' Dworaczek. All Rights Reserved.
2
3#pragma once
4#pragma warning(disable:4996)
5#pragma warning(disable:4265)
6#pragma warning(disable:4701)
7
8#include "CoreMinimal.h"
9#include "Kismet/BlueprintFunctionLibrary.h"
10#include "SteamRequests.h"
11#pragma push_macro("ARRAY_COUNT")
12#undef ARRAY_COUNT
13
14#if USING_CODE_ANALYSIS
15MSVC_PRAGMA(warning(push))
16MSVC_PRAGMA(warning(disable : ALL_CODE_ANALYSIS_WARNINGS))
17#endif
18
19#include "OnlineSubsystemSteam.h"
20#include <steam/steam_api.h>
21
22#if USING_CODE_ANALYSIS
23MSVC_PRAGMA(warning(pop))
24#endif
25
26#pragma pop_macro("ARRAY_COUNT")
27#include "GetStoredStats.generated.h"
28
30UCLASS()
31class STATSINTEGRATION_API UGetStoredStats : public UBlueprintFunctionLibrary
32{
33 GENERATED_BODY()
34
35public:
36 /*
37 Gets the current value of the a stat for the specified user.
38
39 You must have called RequestUserStats and it needs to return successfully via its callback prior to calling this.
40 */
41 UFUNCTION(BlueprintCallable, Category = "Simple Steam Stats & Achievements")
42 static void GetUserStoredStats(TArray<FSteamStat> StatsToGet, TArray<FSteamStat>& StatsOut);
43
44 /*
45 Gets the current value of the a stat for the specified user.
46
47 You must have called RequestUserStats and it needs to return successfully via its callback prior to calling this.
48 */
49 UFUNCTION(BlueprintCallable, Category = "Simple Steam Stats & Achievements")
50 static void GetUserStoredStat(FString APIStatName, ESteamStatType StatType, int32& IntegerValue, float& FloatValue);
51
52 /*
53 Gets the current value of the global stat.
54
55 You must have called RequestGlobalStats and it needs to return successfully via its callback prior to calling this.
56
57 Returns: Boolean
58 This function returns true upon success if all of the following conditions are met; otherwise, false.
59 The specified stat exists in App Admin on the Steamworks website, and the changes are published.
60 RequestGlobalStats has completed and successfully returned its callback.
61 The type matches the type listed in the App Admin panel of the Steamworks website.
62 */
63 UFUNCTION(BlueprintCallable, Category = "Simple Steam Stats & Achievements")
64 static bool GetGlobalStat(FString APIStatName, ESteamGlobalStatType StatType, FString& Value);
65
66 /*
67 Gets the current value of the global stat.
68
69 You must have called RequestGlobalStats and it needs to return successfully via its callback prior to calling this.
70
71 Data will be filled with daily values, starting with today.
72 So when called, Array[0] will be today, Array[1] will be yesterday, and Array[2] will be two days ago, etc.
73
74 Returns: Int32 Number of entries inside the Array.
75 */
76 UFUNCTION(BlueprintCallable, Category = "Simple Steam Stats & Achievements")
77 static int32 GetGlobalStatHistory(FString APIStatName, ESteamGlobalStatType StatType, TArray<FString>& ValuesArray);
78};
UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent)) class CHATSYSTEM_API UChatSystemComponent
Definition ChatSystemComponent.h:13
ESteamStatType
Definition SteamRequests.h:13
ESteamGlobalStatType
Definition SteamRequests.h:22
Definition GetStoredStats.h:32