@@ -29,6 +29,9 @@ r.DefaultFeature.AutoExposure.ExtendDefaultLuminanceRange=true
|
|||||||
r.DefaultFeature.LocalExposure.HighlightContrastScale=0.8
|
r.DefaultFeature.LocalExposure.HighlightContrastScale=0.8
|
||||||
|
|
||||||
r.DefaultFeature.LocalExposure.ShadowContrastScale=0.8
|
r.DefaultFeature.LocalExposure.ShadowContrastScale=0.8
|
||||||
|
r.VirtualTextures=True
|
||||||
|
r.VirtualTexturedLightmaps=True
|
||||||
|
r.VT.AnisotropicFiltering=True
|
||||||
|
|
||||||
[/Script/WindowsTargetPlatform.WindowsTargetSettings]
|
[/Script/WindowsTargetPlatform.WindowsTargetSettings]
|
||||||
DefaultGraphicsRHI=DefaultGraphicsRHI_DX12
|
DefaultGraphicsRHI=DefaultGraphicsRHI_DX12
|
||||||
@@ -166,4 +169,5 @@ EndpointSettings=(bEnableLogging=False,PurgeProcessedMessageDelaySeconds=30,Remo
|
|||||||
|
|
||||||
|
|
||||||
[CoreRedirects]
|
[CoreRedirects]
|
||||||
+ClassRedirects=(OldName="/Script/Elistria_Calling.MagickPlayerState",NewName="/Script/Elistria_Calling.MagickPlayerState")
|
+ClassRedirects=(OldName="/Script/Elistria_Calling.MagickPlayerState",NewName="/Script/Elistria_Calling.MagickPlayerState")
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:27dc90d2b01df9b74f14227a10842dfc55f78a5e1af7986f7596cc669c706168
|
|
||||||
size 14069
|
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:68579ffd5ae20e4bc73b9d80f6ea694979bff438e50b67b7070ef2f9f12c1b93
|
oid sha256:6258070d743d968c594fe262b89bfc481a11e3e81227978b2f4efaf6d0b93719
|
||||||
size 16339
|
size 62126
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:98da41a3882dbc965c6ee9a09295a4647c4aac886193493f93e821ca5f610ae9
|
|
||||||
size 2285
|
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:13e933cf36402a606e5291e411d0a8bcccb9f4fd1d9fcf2355fcba883901a3ef
|
||||||
|
size 2951
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:174bd439e114dc81aaa0c16d43a5c1c61f35cc514e2240f5c5019e43a35863fb
|
oid sha256:6ce77df0fab62ec96b3e072330f8c635aef84b1a2621094bb8a14ab3219786eb
|
||||||
size 645934
|
size 685188
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:47222fe715c49e49a439014fc8837724d78864387d34346b1dfc5d00a3ac486d
|
oid sha256:916849cf65600398dadb51d688bdafac4d69b41f2e3b53ada0ce4d7e0467bb2c
|
||||||
size 1459479
|
size 1460388
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
// Fill out your copyright notice in the Description page of Project Settings.
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
|
||||||
#include "ManaAttributeSet.h"
|
#include "ManaAttributeSet.h"
|
||||||
|
|
||||||
UManaAttributeSet::UManaAttributeSet()
|
UManaAttributeSet::UManaAttributeSet()
|
||||||
@@ -31,4 +30,37 @@ void UManaAttributeSet::OnRep_MaxMana(const FGameplayAttributeData& OldValue)
|
|||||||
const float OldMaxMana = OldValue.GetCurrentValue();
|
const float OldMaxMana = OldValue.GetCurrentValue();
|
||||||
const float NewMaxMana = GetMaxMana();
|
const float NewMaxMana = GetMaxMana();
|
||||||
OnMaxManaChanged.Broadcast(this, OldMaxMana, NewMaxMana);
|
OnMaxManaChanged.Broadcast(this, OldMaxMana, NewMaxMana);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void UManaAttributeSet::PostGameplayEffectExecute(const FGameplayEffectModCallbackData& Data)
|
||||||
|
{
|
||||||
|
Super::PostGameplayEffectExecute(Data);
|
||||||
|
if (Data.EvaluatedData.Attribute == GetManaAttribute())
|
||||||
|
{
|
||||||
|
SetMana(FMath::Clamp(GetMana(), 0.0f, GetMaxMana()));
|
||||||
|
}
|
||||||
|
if (Data.EvaluatedData.Attribute == GetCostAttribute())
|
||||||
|
{
|
||||||
|
const float CostValue = GetCost();
|
||||||
|
const float OldMana = GetMana();
|
||||||
|
const float ManaMax = GetMaxMana();
|
||||||
|
const float NewMana = FMath::Clamp(OldMana-CostValue,0.0f, ManaMax);
|
||||||
|
if (OldMana!=NewMana)
|
||||||
|
{
|
||||||
|
SetMana(NewMana);
|
||||||
|
}
|
||||||
|
SetCost(0.0f);
|
||||||
|
}
|
||||||
|
if (Data.EvaluatedData.Attribute==GetMaxManaAttribute())
|
||||||
|
{
|
||||||
|
const float RestoreValue = GetMaxMana();
|
||||||
|
const float OldMana = GetMana();
|
||||||
|
const float ManaMax = GetMaxMana();
|
||||||
|
const float NewMana = FMath::Clamp(OldMana+RestoreValue,0.0f, ManaMax);
|
||||||
|
if (OldMana!=NewMana)
|
||||||
|
{
|
||||||
|
SetMana(NewMana);
|
||||||
|
}
|
||||||
|
SetRestore(0.0f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
#include "AttributeSet.h"
|
#include "AttributeSet.h"
|
||||||
#include "AbilitySystemComponent.h"
|
#include "AbilitySystemComponent.h"
|
||||||
#include "Net/UnrealNetwork.h"
|
#include "Net/UnrealNetwork.h"
|
||||||
|
#include "GameplayEffectExtension.h"
|
||||||
#include "ManaAttributeSet.generated.h"
|
#include "ManaAttributeSet.generated.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -28,16 +29,26 @@ class ELISTRIA_CALLING_API UManaAttributeSet : public UAttributeSet
|
|||||||
public:
|
public:
|
||||||
UManaAttributeSet();
|
UManaAttributeSet();
|
||||||
|
|
||||||
|
virtual void PostGameplayEffectExecute(const FGameplayEffectModCallbackData& Data) override;
|
||||||
|
|
||||||
virtual void GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const override;
|
virtual void GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const override;
|
||||||
|
|
||||||
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, ReplicatedUsing=OnRep_Mana)
|
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, ReplicatedUsing=OnRep_Mana, meta = (HideFromModifiers))
|
||||||
FGameplayAttributeData Mana;
|
FGameplayAttributeData Mana;
|
||||||
|
|
||||||
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, ReplicatedUsing=OnRep_MaxMana)
|
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, ReplicatedUsing=OnRep_MaxMana)
|
||||||
FGameplayAttributeData MaxMana;
|
FGameplayAttributeData MaxMana;
|
||||||
|
|
||||||
|
UPROPERTY(VisibleAnywhere)
|
||||||
|
FGameplayAttributeData Cost;
|
||||||
|
|
||||||
|
UPROPERTY(VisibleAnywhere)
|
||||||
|
FGameplayAttributeData Restore;
|
||||||
|
|
||||||
ATTRIBUTE_ACCESSORS(UManaAttributeSet, Mana)
|
ATTRIBUTE_ACCESSORS(UManaAttributeSet, Mana)
|
||||||
ATTRIBUTE_ACCESSORS(UManaAttributeSet, MaxMana)
|
ATTRIBUTE_ACCESSORS(UManaAttributeSet, MaxMana)
|
||||||
|
ATTRIBUTE_ACCESSORS(UManaAttributeSet, Cost)
|
||||||
|
ATTRIBUTE_ACCESSORS(UManaAttributeSet, Restore)
|
||||||
|
|
||||||
UFUNCTION()
|
UFUNCTION()
|
||||||
void OnRep_Mana(const FGameplayAttributeData& OldValue);
|
void OnRep_Mana(const FGameplayAttributeData& OldValue);
|
||||||
|
|||||||
Reference in New Issue
Block a user