Space Plunder
Loading...
Searching...
No Matches
RequestStatsAndAchievements.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#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
27#pragma pop_macro("ARRAY_COUNT")
28#include "RequestStatsAndAchievements.generated.h"
29
31DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FResponseRequestStatsAndAchievementsDelegate, int32, SteamErrorOutput);
32
34UCLASS()
35class STATSINTEGRATION_API URequestStatsAndAchievements : public UBlueprintAsyncActionBase
36{
37 GENERATED_BODY()
38
39public:
40 UPROPERTY(BlueprintAssignable)
41 FResponseRequestStatsAndAchievementsDelegate onSuccess;
42
43 UPROPERTY(BlueprintAssignable)
44 FResponseRequestStatsAndAchievementsDelegate onFailure;
45
46 /* Asynchronously downloads stats and achievements from the server. */
47 UFUNCTION(BlueprintCallable, meta = (BlueprintInternalUseOnly = "true"), Category = "Simple Steam Stats & Achievements")
48 static URequestStatsAndAchievements* RequestUserStatsAndAchievements();
49
50private:
51 FOnlineSubsystemSteam* SteamSubsystem;
52
53 virtual void Activate() override;
54
55 void RequestUserStats();
56 void OnUserStatsReceived(UserStatsReceived_t* pCallback, bool bIOFailure);
57 CCallResult<URequestStatsAndAchievements, UserStatsReceived_t> m_callRequestUserStats;
58
59 void RequestGlobalAchievementPercentages();
60 void OnRequestGlobalAchievementPercentages(GlobalAchievementPercentagesReady_t* pCallback, bool bIOFailure);
61 CCallResult<URequestStatsAndAchievements, GlobalAchievementPercentagesReady_t> m_callRequestGlobalAchievementPercentages;
62};
UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent)) class CHATSYSTEM_API UChatSystemComponent
Definition ChatSystemComponent.h:13
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FResponseRequestStatsAndAchievementsDelegate, int32, SteamErrorOutput)
Definition RequestStatsAndAchievements.h:36