Skip to content

Commit 4cc90e9

Browse files
committed
fix: Fix compile issue before release
1 parent fa34974 commit 4cc90e9

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

LootLockerServerSDK/Source/LootLockerServerSDK/Private/LootLockerServerForBlueprints.cpp

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22

33
#include "LootLockerServerForBlueprints.h"
44

5-
#include "LootLockerServerLogger.h"
5+
#include "Runtime/Launch/Resources/Version.h"
6+
#if WITH_EDITOR && (PLATFORM_WINDOWS || PLATFORM_MAC) && ((ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >=2) || ENGINE_MAJOR_VERSION >= 6)
67
#include "Blueprint/BlueprintExceptionInfo.h"
8+
#endif
9+
#include "UObject/TextProperty.h"
710
#include "ServerAPI/LootLockerServerNotificationsRequest.h"
811
#include "Utils/LootLockerServerUtilities.h"
912

@@ -789,7 +792,12 @@ DEFINE_FUNCTION(ULootLockerServerForBlueprints::execSendNotificationToPlayer)
789792
Stack.StepCompiledIn<FProperty>(nullptr);
790793
FProperty* ContentProperty = Stack.MostRecentProperty;
791794
void* ContentAddress = Stack.MostRecentPropertyAddress;
792-
void* ContentContainerAddress = Stack.MostRecentPropertyContainer;
795+
void* ContentContainerAddress =
796+
#if ((ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >=2) || ENGINE_MAJOR_VERSION >= 6)
797+
Stack.MostRecentPropertyContainer;
798+
#else
799+
Stack.Locals; // In editor versions < 5.2 the convenience property MostRecentPropertyContainer doesn't exist. But from my testing, when we utilize this property (for parsing value literal inputs) this is equal to Stack.Locals
800+
#endif
793801

794802
PARAM_PASSED_BY_REF(NotificationType, FStrProperty, FString);
795803
PARAM_PASSED_BY_VAL(Priority, FEnumProperty, ELootLockerServerNotificationPriority);
@@ -820,11 +828,13 @@ DEFINE_FUNCTION(ULootLockerServerForBlueprints::execSendNotificationToPlayer)
820828
{
821829
FString err = FString::Format(TEXT("Type {0} is not supported by this node"), { UnsupportedContentType->GetFName().ToString() });
822830

831+
#if WITH_EDITOR && (PLATFORM_WINDOWS || PLATFORM_MAC) && ((ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >=2) || ENGINE_MAJOR_VERSION >= 6)
823832
const FBlueprintExceptionInfo ExceptionInfo(
824833
EBlueprintExceptionType::AccessViolation,
825834
FText::FromString(err)
826835
);
827836
FBlueprintCoreDelegates::ThrowScriptException(P_THIS, Stack, ExceptionInfo);
837+
#endif
828838
FLootLockerServerSendNotificationsResponse ErrorResponse = LootLockerServerResponseFactory::Error<FLootLockerServerSendNotificationsResponse>(err, LootLockerServerStaticRequestErrorStatusCodes::LL_ERROR_INVALID_INPUT);
829839
OnCompletedRequest.ExecuteIfBound(ErrorResponse);
830840
isSupportedType = false;
@@ -845,7 +855,7 @@ DEFINE_FUNCTION(ULootLockerServerForBlueprints::execSendNotificationToPlayer)
845855
{
846856
if (ContentProperty->IsA(FInt64Property::StaticClass()))
847857
{
848-
ULootLockerServerNotificationsRequest::SendNotificationToPlayerWithLargeIntContent(NotificationType, Priority, RecipientPlayerUlid, *ContentProperty->ContainerPtrToValuePtr<long long>(ContentContainerAddress), Properties, OnCompletedRequest);
858+
ULootLockerServerNotificationsRequest::SendNotificationToPlayerWithLargeIntContent(NotificationType, Priority, RecipientPlayerUlid, *ContentProperty->ContainerPtrToValuePtr<long long>(ContentContainerAddress), Properties, OnCompletedRequest);
849859
} else
850860
{
851861
ULootLockerServerNotificationsRequest::SendNotificationToPlayerWithIntContent(NotificationType, Priority, RecipientPlayerUlid, *ContentProperty->ContainerPtrToValuePtr<int>(ContentContainerAddress), Properties, OnCompletedRequest);

LootLockerServerSDK/Source/LootLockerServerSDK/Private/ServerAPI/LootLockerServerNotificationsRequest.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#include "ServerAPI/LootLockerServerNotificationsRequest.h"
2-
#include "Dom/JsonObject.h"
32

43
#include "LootLockerServerHttpClient.h"
54

LootLockerServerSDK/Source/LootLockerServerSDK/Public/ServerAPI/LootLockerServerNotificationsRequest.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
#pragma once
22

33
#include "CoreMinimal.h"
4+
#include "Dom/JsonValue.h"
45
#include "LootLockerServerResponse.h"
6+
#include "Internationalization/Regex.h"
57

68
#include "LootLockerServerNotificationsRequest.generated.h"
79

0 commit comments

Comments
 (0)