Save Often
This commit is contained in:
@@ -67,3 +67,19 @@ void UAuraAbilitySystemLibrary::InitializeDefaultAttributes(const UObject* World
|
||||
const FGameplayEffectSpecHandle VitalAttributesSpecHandle = ASC->MakeOutgoingSpec(CharacterClassInfo->VitalAttributes, Level, VitalAttributesContextHandle);
|
||||
ASC->ApplyGameplayEffectSpecToSelf(*VitalAttributesSpecHandle.Data.Get());
|
||||
}
|
||||
|
||||
void UAuraAbilitySystemLibrary::GiveStartupAbilities(const UObject* WorldContextObject, UAbilitySystemComponent* ASC)
|
||||
{
|
||||
|
||||
AAuraGameMode* AuraGameMode = Cast<AAuraGameMode>(UGameplayStatics::GetGameMode(WorldContextObject));
|
||||
if (AuraGameMode == nullptr) return;
|
||||
|
||||
UCharacterClassInfo* CharacterClassInfo = AuraGameMode->CharacterClassInfo;
|
||||
for (TSubclassOf<UGameplayAbility> AbilityClass : CharacterClassInfo->CommonAbilities)
|
||||
{
|
||||
FGameplayAbilitySpec AbilitySpec = FGameplayAbilitySpec(AbilityClass, 1);
|
||||
ASC->GiveAbility(AbilitySpec);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -144,7 +144,12 @@ void UAuraAttributeSet::PostGameplayEffectExecute(const FGameplayEffectModCallba
|
||||
{
|
||||
const float NewHealth = GetHealth()-LocalIncomingDamage;
|
||||
SetHealth(FMath::Clamp(NewHealth, 0, GetMaxHealth()));
|
||||
const bool bFatal = NewHealth <= 0;
|
||||
const bool bFatal = NewHealth <= 0.f;
|
||||
|
||||
if (bFatal)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
|
||||
#include "AbilitySystem/AuraProjectileSpell.h"
|
||||
|
||||
#include "AbilitySystemBlueprintLibrary.h"
|
||||
#include "AbilitySystemComponent.h"
|
||||
#include "AuraGameplayTags.h"
|
||||
@@ -45,7 +44,10 @@ void UAuraProjectileSpell::SpawnProjectile(const FVector ProjectileTargetLocatio
|
||||
const FGameplayEffectSpecHandle SpecHandle = SourceASC->MakeOutgoingSpec(DamageEffectClass, GetAbilityLevel(), SourceASC->MakeEffectContext());
|
||||
|
||||
const FAuraGameplayTags GameplayTags = FAuraGameplayTags::Get();
|
||||
UAbilitySystemBlueprintLibrary::AssignTagSetByCallerMagnitude(SpecHandle, GameplayTags.Damage, Damage);
|
||||
const float ScaledDamage = Damage.GetValueAtLevel(GetAbilityLevel());
|
||||
//const float ScaledDamage = Damage.GetValueAtLevel(1);
|
||||
|
||||
UAbilitySystemBlueprintLibrary::AssignTagSetByCallerMagnitude(SpecHandle, GameplayTags.Damage, ScaledDamage);
|
||||
|
||||
Projectile->DamageEffectSpecHandle = SpecHandle;
|
||||
Projectile->FinishSpawning(SpawnTransform);
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
// Copyright Echo Devgroup
|
||||
|
||||
|
||||
#include "AbilitySystem/Data/CharacterClassInfo.h"
|
||||
|
||||
FCharacterClassDefaultInfo UCharacterClassInfo::GetClassDefaultInfo(ECharacterClass CharacterClass)
|
||||
{
|
||||
return CharacterClassInformation.FindChecked(CharacterClass);
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// Copyright Echo Devgroup
|
||||
|
||||
|
||||
#include "AbilitySystem/GameplayAbility/AuraDamageAbility.h"
|
||||
Reference in New Issue
Block a user