RealtimeStyleTransferRuntime/Source/LyraGame/AbilitySystem/LyraGameplayAbilityTargetDa...

48 lines
1.4 KiB
C
Raw Permalink Normal View History

2022-05-23 18:41:30 +00:00
// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Abilities/GameplayAbilityTargetTypes.h"
2022-09-13 07:18:28 +00:00
#include "HAL/Platform.h"
#include "UObject/Class.h"
2022-05-23 18:41:30 +00:00
#include "LyraGameplayAbilityTargetData_SingleTargetHit.generated.h"
2022-09-13 07:18:28 +00:00
class FArchive;
struct FGameplayEffectContextHandle;
2022-05-23 18:41:30 +00:00
/** Game-specific additions to SingleTargetHit tracking */
USTRUCT()
struct FLyraGameplayAbilityTargetData_SingleTargetHit : public FGameplayAbilityTargetData_SingleTargetHit
{
GENERATED_BODY()
FLyraGameplayAbilityTargetData_SingleTargetHit()
: CartridgeID(-1)
{ }
virtual void AddTargetDataToContext(FGameplayEffectContextHandle& Context, bool bIncludeActorArray) const override;
/** ID to allow the identification of multiple bullets that were part of the same cartridge */
UPROPERTY()
int32 CartridgeID;
bool NetSerialize(FArchive& Ar, class UPackageMap* Map, bool& bOutSuccess);
virtual UScriptStruct* GetScriptStruct() const override
{
return FLyraGameplayAbilityTargetData_SingleTargetHit::StaticStruct();
}
};
template<>
struct TStructOpsTypeTraits<FLyraGameplayAbilityTargetData_SingleTargetHit> : public TStructOpsTypeTraitsBase2<FLyraGameplayAbilityTargetData_SingleTargetHit>
{
enum
{
WithNetSerializer = true // For now this is REQUIRED for FGameplayAbilityTargetDataHandle net serialization to work
};
};