-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBaseAttributeSet.cpp
123 lines (110 loc) · 4.11 KB
/
BaseAttributeSet.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
#include "BaseAttributeSet.h"
#include "GameplayEffect.h"
#include "GameplayEffectExtension.h"
UBaseAttributeSet::UBaseAttributeSet() {
}
void UBaseAttributeSet::PostGameplayEffectExecute(const FGameplayEffectModCallbackData& Data) {
Super::PostGameplayEffectExecute(Data);
if (Data.EvaluatedData.Attribute == GetCurrentHealthAttribute()) {
SetCurrentHealth(FMath::Clamp(GetCurrentHealth(), 0.0f, GetMaxHealth()));
}
if (Data.EvaluatedData.Attribute == GetCurrentManaAttribute()) {
SetCurrentMana(FMath::Clamp(GetCurrentMana(), 0.0f, GetMaxMana()));
}
if (Data.EvaluatedData.Attribute == GetCurrentStaminaAttribute()) {
SetCurrentStamina(FMath::Clamp(GetCurrentStamina(), 0.0f, GetMaxStamina()));
}
if (Data.EvaluatedData.Attribute == GetArmorAttribute()) {
SetArmor(GetArmor());
}
if (Data.EvaluatedData.Attribute == GetStrengthAttribute()) {
SetStrength(GetStrength());
}
if (Data.EvaluatedData.Attribute == GetAgilityAttribute()) {
SetAgility(GetAgility());
}
if (Data.EvaluatedData.Attribute == GetEnduranceAttribute()) {
SetEndurance(GetEndurance());
}
if (Data.EvaluatedData.Attribute == GetIntellectAttribute()) {
SetIntellect(GetIntellect());
}
if (Data.EvaluatedData.Attribute == GetWisdomAttribute()) {
SetWisdom(GetWisdom());
}
if (Data.EvaluatedData.Attribute == GetCharismaAttribute()) {
SetCharisma(GetCharisma());
}
if (Data.EvaluatedData.Attribute == GetMeleeAttackPowerAttribute()) {
SetMeleeAttackPower(GetMeleeAttackPower());
}
if (Data.EvaluatedData.Attribute == GetRangedAttackPowerAttribute()) {
SetRangedAttackPower(GetRangedAttackPower());
}
if (Data.EvaluatedData.Attribute == GetSpellPowerAttribute()) {
SetSpellPower(GetSpellPower());
}
if (Data.EvaluatedData.Attribute == GetMeleeHitChanceAttribute()) {
SetMeleeHitChance(GetMeleeHitChance());
}
if (Data.EvaluatedData.Attribute == GetRangedHitChanceAttribute()) {
SetRangedHitChance(GetRangedHitChance());
}
if (Data.EvaluatedData.Attribute == GetSpellHitChanceAttribute()) {
SetSpellHitChance(GetSpellHitChance());
}
if (Data.EvaluatedData.Attribute == GetMeleeCritChanceAttribute()) {
SetMeleeCritChance(GetMeleeCritChance());
}
if (Data.EvaluatedData.Attribute == GetRangedCritChanceAttribute()) {
SetRangedCritChance(GetRangedCritChance());
}
if (Data.EvaluatedData.Attribute == GetSpellCritChanceAttribute()) {
SetSpellCritChance(GetSpellCritChance());
}
if (Data.EvaluatedData.Attribute == GetArmorPenetrationAttribute()) {
SetArmorPenetration(GetArmorPenetration());
}
if (Data.EvaluatedData.Attribute == GetSpellPenetrationAttribute()) {
SetSpellPenetration(GetSpellPenetration());
}
if (Data.EvaluatedData.Attribute == GetDodgeChanceAttribute()) {
SetDodgeChance(GetDodgeChance());
}
if (Data.EvaluatedData.Attribute == GetParryChanceAttribute()) {
SetParryChance(GetParryChance());
}
if (Data.EvaluatedData.Attribute == GetBlockChanceAttribute()) {
SetBlockChance(GetBlockChance());
}
if (Data.EvaluatedData.Attribute == GetBlockAmountAttribute()) {
SetBlockAmount(GetBlockAmount());
}
if (Data.EvaluatedData.Attribute == GetHasteAttribute()) {
SetHaste(GetHaste());
}
if (Data.EvaluatedData.Attribute == GetFireResistanceAttribute()) {
SetFireResistance(GetFireResistance());
}
if (Data.EvaluatedData.Attribute == GetFrostResistanceAttribute()) {
SetFrostResistance(GetFrostResistance());
}
if (Data.EvaluatedData.Attribute == GetHolyResistanceAttribute()) {
SetHolyResistance(GetHolyResistance());
}
if (Data.EvaluatedData.Attribute == GetShadowResistanceAttribute()) {
SetShadowResistance(GetShadowResistance());
}
if (Data.EvaluatedData.Attribute == GetNatureResistanceAttribute()) {
SetNatureResistance(GetNatureResistance());
}
if (Data.EvaluatedData.Attribute == GetArcaneResistanceAttribute()) {
SetArcaneResistance(GetArcaneResistance());
}
if (Data.EvaluatedData.Attribute == GetDevotionAttribute()) {
SetDevotion(GetDevotion());
}
if (Data.EvaluatedData.Attribute == GetProficiencyAttribute()) {
SetProficiency(GetProficiency());
}
}