fix(Script/Spells): Anti-Magic Zone amount calc (#7438)
* cherry-pick commit (bea682f95c)
Co-authored-by: Lucas Nascimento <keader.android@gmail.com>
This commit is contained in:
parent
92acf6feb8
commit
62058ffbea
1 changed files with 13 additions and 6 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue