FActiveGameplayEffectsContainer

Active GameplayEffects Container -Bucket of ActiveGameplayEffects -Needed for FFastArraySerialization

Windows
MacOS
Linux

Inheritance Hierarchy

FFastArraySerializer

FActiveGameplayEffectsContainer

References

Module

GameplayAbilities

Header

/Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Public/GameplayEffect.h

Include

#include "GameplayEffect.h"

Syntax

[USTRUCT](Programming/UnrealArchitecture/Reference/Structs)()
struct FActiveGameplayEffectsContainer : public FFastArraySerializer

Remarks

Active GameplayEffects Container -Bucket of ActiveGameplayEffects -Needed for FFastArraySerialization

This should only be used by UAbilitySystemComponent. All of this could just live in UAbilitySystemComponent except that we need a distinct USTRUCT to implement FFastArraySerializer.

The preferred way to iterate through the ActiveGameplayEffectContainer is with CreateConstIterator/CreateIterator or stl style range iteration:

for (const FActiveGameplayEffect& Effect : this) {} for (auto It = CreateConstIterator(); It; ++It) {}

Variables

Name Description

Public variable

TArray< DebugEx...

 

DebugExecutedGameplayEffects

Stores a record of gameplay effects that have executed and their results. Useful for debugging

Public variable

FOnGivenActiveG...

 

OnActiveGameplayEffectRemovedDelegate

Public variable

UAbilitySystemC...

 

Owner

Public variable

bool

 

OwnerIsNetAuthority

Constructors

Destructors

Functions

Name Description

Public function

FActiveGamep...

 

ApplyGameplayEffectSpec

(
    const FGameplayEffectSpec& Spec,
    FPredictionKey& InPredictionKey,
    bool& bFoundExistingStackableGE
)

Public function

void

 

ApplyModToAttribute

(
    const FGameplayAttribute& Attribut...,
    TEnumAsByte< EGameplayModOp::Type >...,
    float ModifierMagnitude,
    const FGameplayEffectModCallbackDat...
)

Actually applies given mod to the attribute

Public function

void

 

AttemptRemoveActiveEffectsOnEffectApplication

(
    const FGameplayEffectSpec& InSpec,
    const FActiveGameplayEffectHandle&...
)

Method called during effect application to process if any active effects should be removed from this effects application

Public function

bool

 

CanApplyAttributeModifiers

(
    const UGameplayEffect* Gamepla...,
    float Level,
    const FGameplayEffectContextHandle ...
)

Public function

void

 

CaptureAttributeForGameplayEffect

Populate the specified capture spec with the data necessary to capture an attribute from the container

Public function

void

 

CheckDuration

(
    FActiveGameplayEffectHandle Handle
)

Public function

void

 

CloneFrom

(
    const FActiveGameplayEffectsContain...
)

Performs a deep copy on the source container, duplicating all gameplay effects and reconstructing the attribute aggregator map to match the passed in source.

Public function Const

ConstIterato...

 

CreateConstIterator()

Public function

Iterator

 

CreateIterator()

Public function

void

 

DebugCyclicAggregatorBroadcasts

(
    FAggregator* Aggregator
)

Public function

void

 

DecrementLock()

Public function

void

 

ExecuteActiveEffectsFrom

(
    FGameplayEffectSpec& Spec,
    FPredictionKey PredictionKey
)

This is the main function that executes a GameplayEffect on Attributes and ActiveGameplayEffects

Public function

void

 

ExecutePeriodicGameplayEffect

(
    FActiveGameplayEffectHandle Handle
)

Public function Const

int32

 

GetActiveEffectCount

(
    const FGameplayEffectQuery& Query,
    bool bEnforceOnGoingCheck
)

Get the count of the effects matching the specified query (including stack count)

Public function Const

TArray< FAct...

 

GetActiveEffects

(
    const FGameplayEffectQuery& Query
)

Public function Const

TArray< floa...

 

GetActiveEffectsDuration

(
    const FGameplayEffectQuery& Query
)

Public function Const

float

 

GetActiveEffectsEndTime

(
    const FGameplayEffectQuery& Query,
    TArray< AActor* >& Instigator...
)

Public function Const

bool

 

GetActiveEffectsEndTimeAndDuration

(
    const FGameplayEffectQuery& Query,
    float& EndTime,
    float& Duration,
    TArray< AActor* >& Instigator...
)

Public function Const

TArray< floa...

 

GetActiveEffectsTimeRemaining

(
    const FGameplayEffectQuery& Query
)

Public function Const

TArray< TPai...

 

GetActiveEffectsTimeRemainingAndDuration

(
    const FGameplayEffectQuery& Query
)

Public function

FActiveGamep...

 

GetActiveGameplayEffect

(
    const FActiveGameplayEffectHandle H...
)

Public function Const

const FActiv...

 

GetActiveGameplayEffect

(
    const FActiveGameplayEffectHandle H...
)

Public function Const

void

 

GetActiveGameplayEffectDataByAttribute

Public function Const

TArray< FAct...

 

GetAllActiveEffectHandles()

Returns an array of all of the active gameplay effect handles

Public function Const

void

 

GetAllActiveGameplayEffectSpecs

(
    TArray< FGameplayEffectSpec >& Out...
)

Public function Const

float

 

GetAttributeBaseValue

(
    FGameplayAttribute Attribute
)

Public function

float

 

GetEffectContribution

(
    const FAggregatorEvaluateParameters...,
    FActiveGameplayEffectHandle ActiveH...,
    FGameplayAttribute Attribute
)

Public function

FOnGameplayA...

 

GetGameplayAttributeValueChangeDelegate

(
    FGameplayAttribute Attribute
)

Public function Const

float

 

GetGameplayEffectMagnitude

(
    FActiveGameplayEffectHandle Handle,
    FGameplayAttribute Attribute
)

Public function Const

const FGamep...

 

GetGameplayEffectSourceTagsFromHandle

(
    FActiveGameplayEffectHandle Handle
)

Get the source tags from the gameplay spec represented by the specified handle, if possible

Public function Const

void

 

GetGameplayEffectStartTimeAndDuration

(
    FActiveGameplayEffectHandle Handle,
    float& EffectStartTime,
    float& EffectDuration
)

Public function Const

const FGamep...

 

GetGameplayEffectTargetTagsFromHandle

(
    FActiveGameplayEffectHandle Handle
)

Get the target tags from the gameplay spec represented by the specified handle, if possible

Public function Const

int32

 

GetNumGameplayEffects()

Returns the total number of gameplay effects.

Public function Const

float

 

GetServerWorldTime()

Public function Const

float

 

GetWorldTime()

Public function Const

void

 

GrabDebugSnapshot

(
    FVisualLogEntry* Snapshot
)

Public function Const

bool

 

HasApplicationImmunityToSpec

(
    const FGameplayEffectSpec& SpecToA...,
    const FActiveGameplayEffect*& ...
)

Public function Const

bool

 

HasPredictedEffectWithPredictedKey

(
    FPredictionKey PredictionKey
)

Public function Const

bool

 

HasReceivedEffectWithPredictedKey

(
    FPredictionKey PredictionKey
)

Public function

void

 

IncrementLock()

Public function Const

bool

 

IsServerWorldTimeAvailable()

Public function

void

 

ModifyActiveEffectStartTime

(
    FActiveGameplayEffectHandle Handle,
    float StartTimeDiff
)

Public function

bool

 

NetDeltaSerialize

(
    FNetDeltaSerializeInfo& DeltaParms
)

Public function

void

 

OnOwnerTagChange

(
    FGameplayTag TagChange,
    int32 NewCount
)

Public function Const

void

 

PrintAllGameplayEffects()

Public function

void

 

RecomputeStartWorldTimes

(
    const float WorldTime,
    const float ServerWorldTime
)

Recomputes the start time for all active abilities

Public function

void

 

RegisterWithOwner

(
    UAbilitySystemComponent* Owner
)

Public function

int32

 

RemoveActiveEffects

(
    const FGameplayEffectQuery& Query,
    int32 StacksToRemove
)

Public function

bool

 

RemoveActiveGameplayEffect

(
    FActiveGameplayEffectHandle Handle,
    int32 StacksToRemove
)

Called on server to remove a GameplayEffect

Public function

void

 

SetActiveGameplayEffectLevel

(
    FActiveGameplayEffectHandle ActiveH...,
    int32 NewLevel
)

Public function

void

 

SetAttributeBaseValue

(
    FGameplayAttribute Attribute,
    float NewBaseValue
)

Public function

void

 

SetBaseAttributeValueFromReplication

(
    const FGameplayAttribute& Attribut...,
    float NewBaseValue,
    float OldBaseValue
)

Public function

void

 

Uninitialize()

Classes

Typedefs

Name

Description

ConstIterator

Iterator

Deprecated Functions

Name Description

Public function

FOnGameplayA...

 

RegisterGameplayAttributeEvent

(
    FGameplayAttribute Attribute
)

Use GetGameplayAttributeValueChangeDelegate (the delegate signature has changed)

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss