Files
Aura-TopDownRPG-GAS/Source/Aura/Private/AbilitySystem/AuraAbilitySystemComponent.cpp
2025-10-14 22:20:59 -04:00

29 lines
940 B
C++

// Copyright Echo Devgroup
#include "AbilitySystem/AuraAbilitySystemComponent.h"
void UAuraAbilitySystemComponent::AbilityActorInfoSet()
{
OnGameplayEffectAppliedDelegateToSelf.AddUObject( this, &UAuraAbilitySystemComponent::EffectApplied);
}
void UAuraAbilitySystemComponent::EffectApplied(UAbilitySystemComponent* AbilitySystemComponent,
const FGameplayEffectSpec& EffectSpec, FActiveGameplayEffectHandle ActiveEffectHandle)
{
//GEngine->AddOnScreenDebugMessage(1,8.f, FColor::Blue,FString("Effect Applied!"));
FGameplayTagContainer TagContainer;
EffectSpec.GetAllAssetTags(TagContainer);
EffectAssetTags.Broadcast(TagContainer);
for (const FGameplayTag& Tag : TagContainer)
{
//TODO: Broadcast the tag to the widget controller
//Message for Debugging tags being applied
//const FString msg = FString::Printf(TEXT("GE Tag: %s"), *Tag.ToString());
//GEngine->AddOnScreenDebugMessage(-1,8.f, FColor::Blue,msg);
}
}