Don't drink and code.
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
|
||||
#include "AbilitySystemBlueprintLibrary.h"
|
||||
#include "AbilitySystemComponent.h"
|
||||
#include "AuraGameplayTags.h"
|
||||
#include "Actor/AuraProjectile.h"
|
||||
#include "Interact/CombatInterface.h"
|
||||
|
||||
@@ -42,9 +43,15 @@ void UAuraProjectileSpell::SpawnProjectile(const FVector ProjectileTargetLocatio
|
||||
|
||||
const UAbilitySystemComponent* SourceASC = UAbilitySystemBlueprintLibrary::GetAbilitySystemComponent(GetAvatarActorFromActorInfo());
|
||||
const FGameplayEffectSpecHandle SpecHandle = SourceASC->MakeOutgoingSpec(DamageEffectClass, GetAbilityLevel(), SourceASC->MakeEffectContext());
|
||||
|
||||
const FAuraGameplayTags GameplayTags = FAuraGameplayTags::Get();
|
||||
const float ScaledDamage = Damage.GetValueAtLevel((GetAbilityLevel()));
|
||||
UAbilitySystemBlueprintLibrary::AssignTagSetByCallerMagnitude(SpecHandle, GameplayTags.Damage, ScaledDamage);
|
||||
|
||||
|
||||
Projectile->DamageEffectSpecHandle = SpecHandle;
|
||||
|
||||
UE_LOG(LogTemp,Warning,TEXT("Projectile - SourceASC %s - DamageEffectClass %s"), *SourceASC->GetName(), *DamageEffectClass->GetName());
|
||||
UE_LOG(LogTemp,Warning,TEXT("ScaledDamage %f"),ScaledDamage);
|
||||
Projectile->FinishSpawning(SpawnTransform);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user