1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
// Copyright 2018 Sabre Dart Studios
#pragma once
#include "CoreMinimal.h"
#include "Kismet/BlueprintFunctionLibrary.h"
#include "GameplayEffectAggregator.h"
#include "GameplayEffect.h"
#include "AbilitySystemGlobals.h"
#include "AbilitySystemComponent.h"
#include "AbilitySystemInterface.h"
#include "OWSGameplayAbilityTargetDatafilter.h"
#include "OWSAbilitySystemBlueprintLibrary.generated.h"
USTRUCT(BlueprintType)
struct FGameplayAbilityCastingTargetingLocationInfo : public FGameplayAbilityTargetData
{
GENERATED_USTRUCT_BODY()
/** Amount of time the ability has been charged */
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = Targeting)
float ChargeTime;
/** The ID of the Ability that is performing targeting */
UPROPERTY()
uint32 UniqueID;
/** Generic location data for source */
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = Targeting)
FGameplayAbilityTargetingLocationInfo SourceLocation;
/** Generic location data for target */
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = Targeting)
FGameplayAbilityTargetingLocationInfo TargetLocation;
// -------------------------------------
FGameplayAbilityCastingTargetingLocationInfo()
{
}
virtual bool HasOrigin() const override
{
return true;
}
virtual FTransform GetOrigin() const override
{
return SourceLocation.GetTargetingTransform();
}
// -------------------------------------
virtual bool HasEndPoint() const override
{
return true;
}
virtual FVector GetEndPoint() const override
{
return TargetLocation.GetTargetingTransform().GetLocation();
}
virtual FTransform GetEndPointTransform() const override
{
return TargetLocation.GetTargetingTransform();
}
// -------------------------------------
virtual UScriptStruct* GetScriptStruct() const override
{
return FGameplayAbilityCastingTargetingLocationInfo::StaticStruct();
}
virtual FString ToString() const override
{
return TEXT("FGameplayAbilityCastingTargetingLocationInfo");
}
bool NetSerialize(FArchive& Ar, class UPackageMap* Map, bool& bOutSuccess);
};
template<>
struct TStructOpsTypeTraits<FGameplayAbilityCastingTargetingLocationInfo> : public TStructOpsTypeTraitsBase2<FGameplayAbilityCastingTargetingLocationInfo>
{
enum
{
WithNetSerializer = true // For now this is REQUIRED for FGameplayAbilityTargetDataHandle net serialization to work
};
};
/**
*
*/
UCLASS()
class OWSPLUGIN_API UOWSAbilitySystemBlueprintLibrary : public UBlueprintFunctionLibrary
{
GENERATED_BODY()
public:
UFUNCTION(BlueprintPure, Category = "Ability|TargetData")
static FGameplayAbilityTargetDataHandle FilterTargetData(const FGameplayAbilityTargetDataHandle& TargetDataHandle, FOWSGameplayTargetDataFilterHandle FilterHandle);
UFUNCTION(BlueprintPure, Category = "Filter")
static FOWSGameplayTargetDataFilterHandle MakeFilterHandle(FOWSGameplayTargetDataFilter Filter, AActor* FilterActor);
UFUNCTION(BlueprintPure, Category = "Ability|TargetData")
static float GetOWSChargeTimeFromTargetData(const FGameplayAbilityTargetDataHandle& TargetData, int32 Index);
};