aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAqua Deus <95978183+aquadeus@users.noreply.github.com>2024-09-28 17:50:07 +0200
committerGitHub <noreply@github.com>2024-09-28 17:50:07 +0200
commitf5dfc0e4cdac277d89b2ab3891ae75203fa3cd36 (patch)
treed0ed598ac549bf62c3b7703136277b70158ce497 /src
parent89f490bdcdf88c2576c17218926e89b1082ae682 (diff)
Scripts/Spells: Fix Anti-Magic shell amount with Anti-Magic Barrier talent (#30234)
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Spells/spell_dk.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp
index 4e1612b5576..5de35a0f760 100644
--- a/src/server/scripts/Spells/spell_dk.cpp
+++ b/src/server/scripts/Spells/spell_dk.cpp
@@ -36,6 +36,7 @@
enum DeathKnightSpells
{
+ SPELL_DK_ANTI_MAGIC_BARRIER = 205727,
SPELL_DK_ARMY_FLESH_BEAST_TRANSFORM = 127533,
SPELL_DK_ARMY_GEIST_TRANSFORM = 127534,
SPELL_DK_ARMY_NORTHREND_SKELETON_TRANSFORM = 127528,
@@ -136,7 +137,7 @@ public:
bool Validate(SpellInfo const* spellInfo) override
{
return ValidateSpellInfo({ SPELL_DK_RUNIC_POWER_ENERGIZE, SPELL_DK_VOLATILE_SHIELDING })
- && ValidateSpellEffect({ { spellInfo->Id, EFFECT_1 } });
+ && ValidateSpellEffect({ { spellInfo->Id, EFFECT_1 }, { SPELL_DK_ANTI_MAGIC_BARRIER, EFFECT_2 } });
}
bool Load() override
@@ -151,6 +152,9 @@ public:
{
amount = CalculatePct(maxHealth, absorbPct);
+ if (AuraEffect* const antiMagicBarrier = GetCaster()->GetAuraEffect(SPELL_DK_ANTI_MAGIC_BARRIER, EFFECT_2))
+ AddPct(amount, antiMagicBarrier->GetAmount());
+
if (Player const* player = GetUnitOwner()->ToPlayer())
AddPct(amount, player->GetRatingBonusValue(CR_VERSATILITY_DAMAGE_DONE) + player->GetTotalAuraModifier(SPELL_AURA_MOD_VERSATILITY));
}