diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp index ceb753145..f0001b6e3 100644 --- a/src/server/scripts/Spells/spell_dk.cpp +++ b/src/server/scripts/Spells/spell_dk.cpp @@ -1185,14 +1185,21 @@ public: return ValidateSpellInfo({ SPELL_DK_ANTI_MAGIC_SHELL_TALENT }); } - void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& canBeRecalculated) + void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/) { SpellInfo const* talentSpell = sSpellMgr->AssertSpellInfo(SPELL_DK_ANTI_MAGIC_SHELL_TALENT); - amount = talentSpell->Effects[EFFECT_0].CalcValue(GetCaster()); - if (Unit* totem = GetCaster()) - if (Unit* owner = totem->ToTotem()->GetSummoner()) - amount += int32(2 * owner->GetTotalAttackPowerValue(BASE_ATTACK)); - canBeRecalculated = false; + + Unit* owner = GetCaster()->GetOwner(); + if (!owner) + { + return; + } + + amount = talentSpell->Effects[EFFECT_0].CalcValue(owner); + if (Player* player = owner->ToPlayer()) + { + amount += int32(2 * player->GetTotalAttackPowerValue(BASE_ATTACK)); + } } void Absorb(AuraEffect* /*aurEff*/, DamageInfo& dmgInfo, uint32& absorbAmount)