Space Plunder
Loading...
Searching...
No Matches
StoreStatsAndAchievements.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/BlueprintAsyncActionBase.h"
10#pragma push_macro("ARRAY_COUNT")
11#undef ARRAY_COUNT
12
13#if USING_CODE_ANALYSIS
14MSVC_PRAGMA(warning(push))
15MSVC_PRAGMA(warning(disable : ALL_CODE_ANALYSIS_WARNINGS))
16#endif
17
18#include "OnlineSubsystemSteam.h"
19#include <steam/steam_api.h>
20
21#if USING_CODE_ANALYSIS
22MSVC_PRAGMA(warning(pop))
23#endif
24
25#pragma pop_macro("ARRAY_COUNT")
26#include "StoreStatsAndAchievements.generated.h"
27
29DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FResponseStoreStatsAndAchievementsDelegate, int32, SteamErrorOutput);
30
32UCLASS()
33class STATSINTEGRATION_API UStoreStatsAndAchievements : public UBlueprintAsyncActionBase
34{
35 GENERATED_BODY()
36
37public:
38 UPROPERTY(BlueprintAssignable)
39 FResponseStoreStatsAndAchievementsDelegate onSuccess;
40
41 UPROPERTY(BlueprintAssignable)
42 FResponseStoreStatsAndAchievementsDelegate onFailure;
43
44 /* Asynchronously uploads stats and achievements to the server. */
45 UFUNCTION(BlueprintCallable, meta = (BlueprintInternalUseOnly = "true"), Category = "Simple Steam Stats & Achievements")
46 static UStoreStatsAndAchievements* StoreUserStatsAndAchievements();
47
48private:
49 FOnlineSubsystemSteam* SteamSubsystem;
50 bool bFetchedStatsOrAchievements;
51
52 virtual void Activate() override;
53 void UnregisterAllCallbacks();
54
55 STEAM_CALLBACK_MANUAL(UStoreStatsAndAchievements, OnUserStatsStored, UserStatsStored_t, StoreUserStats);
56 STEAM_CALLBACK_MANUAL(UStoreStatsAndAchievements, OnUserAchievementsStored, UserAchievementStored_t, StoreUserAchievements);
57};
UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent)) class CHATSYSTEM_API UChatSystemComponent
Definition ChatSystemComponent.h:13
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FResponseStoreStatsAndAchievementsDelegate, int32, SteamErrorOutput)
Definition StoreStatsAndAchievements.h:34