From d8eefa6b878006fefd28159c1dbeedc03b34fd32 Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Wed, 31 May 2023 18:05:17 +0200 Subject: [PATCH] Update spell_dk.cpp --- src/server/scripts/Spells/spell_dk.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp index 6d3c3d942e..0c5c4d1dbf 100644 --- a/src/server/scripts/Spells/spell_dk.cpp +++ b/src/server/scripts/Spells/spell_dk.cpp @@ -1715,8 +1715,9 @@ class spell_dk_impurity : public AuraScript void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/) { - if (AuraEffect* aurEff = caster->GetDummyAuraEffect(SPELLFAMILY_DEATHKNIGHT, 1986 /*Impurity IconID*/, EFFECT_0)) - AddPct(amount, aurEff->GetAmount()); + if (Unit* caster = GetCaster()) + if (AuraEffect* aurEff = caster->GetDummyAuraEffect(SPELLFAMILY_DEATHKNIGHT, 1986 /*Impurity IconID*/, EFFECT_0)) + AddPct(amount, aurEff->GetAmount()); } void Register() override