mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 17:19:07 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user