Save Often

This commit is contained in:
2025-11-02 06:40:35 -05:00
parent 92f0e7d794
commit 2dbdfa5bf8
143 changed files with 18130 additions and 9077 deletions

View File

@@ -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);
}
}

View File

@@ -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)
{
}
}
}
}

View File

@@ -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);

View File

@@ -0,0 +1,9 @@
// Copyright Echo Devgroup
#include "AbilitySystem/Data/CharacterClassInfo.h"
FCharacterClassDefaultInfo UCharacterClassInfo::GetClassDefaultInfo(ECharacterClass CharacterClass)
{
return CharacterClassInformation.FindChecked(CharacterClass);
}

View File

@@ -0,0 +1,4 @@
// Copyright Echo Devgroup
#include "AbilitySystem/GameplayAbility/AuraDamageAbility.h"