2
2
3
3
#include " LootLockerServerForBlueprints.h"
4
4
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)
6
7
#include " Blueprint/BlueprintExceptionInfo.h"
8
+ #endif
9
+ #include " UObject/TextProperty.h"
7
10
#include " ServerAPI/LootLockerServerNotificationsRequest.h"
8
11
#include " Utils/LootLockerServerUtilities.h"
9
12
@@ -789,7 +792,12 @@ DEFINE_FUNCTION(ULootLockerServerForBlueprints::execSendNotificationToPlayer)
789
792
Stack.StepCompiledIn <FProperty>(nullptr );
790
793
FProperty* ContentProperty = Stack.MostRecentProperty ;
791
794
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
793
801
794
802
PARAM_PASSED_BY_REF (NotificationType, FStrProperty, FString);
795
803
PARAM_PASSED_BY_VAL (Priority, FEnumProperty, ELootLockerServerNotificationPriority);
@@ -820,11 +828,13 @@ DEFINE_FUNCTION(ULootLockerServerForBlueprints::execSendNotificationToPlayer)
820
828
{
821
829
FString err = FString::Format (TEXT (" Type {0} is not supported by this node" ), { UnsupportedContentType->GetFName ().ToString () });
822
830
831
+ #if WITH_EDITOR && (PLATFORM_WINDOWS || PLATFORM_MAC) && ((ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >=2) || ENGINE_MAJOR_VERSION >= 6)
823
832
const FBlueprintExceptionInfo ExceptionInfo (
824
833
EBlueprintExceptionType::AccessViolation,
825
834
FText::FromString (err)
826
835
);
827
836
FBlueprintCoreDelegates::ThrowScriptException (P_THIS, Stack, ExceptionInfo);
837
+ #endif
828
838
FLootLockerServerSendNotificationsResponse ErrorResponse = LootLockerServerResponseFactory::Error<FLootLockerServerSendNotificationsResponse>(err, LootLockerServerStaticRequestErrorStatusCodes::LL_ERROR_INVALID_INPUT);
829
839
OnCompletedRequest.ExecuteIfBound (ErrorResponse);
830
840
isSupportedType = false ;
@@ -845,7 +855,7 @@ DEFINE_FUNCTION(ULootLockerServerForBlueprints::execSendNotificationToPlayer)
845
855
{
846
856
if (ContentProperty->IsA (FInt64Property::StaticClass ()))
847
857
{
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);
849
859
} else
850
860
{
851
861
ULootLockerServerNotificationsRequest::SendNotificationToPlayerWithIntContent (NotificationType, Priority, RecipientPlayerUlid, *ContentProperty->ContainerPtrToValuePtr <int >(ContentContainerAddress), Properties, OnCompletedRequest);
0 commit comments