refactor(Scripts/Spells): code cleanup (part 9) (#6946)

This commit is contained in:
Francesco Borzì
2021-07-22 01:12:28 +02:00
committed by GitHub
parent 9ab6ba9664
commit 3b752dd796
7 changed files with 36 additions and 17 deletions

View File

@@ -227,10 +227,14 @@ public:
// Xinef: removed divine guardian because it will affect triggered spell with increased amount
// Arena - Dampening
if (AuraEffect const* dampening = caster->GetAuraEffect(SPELL_GENERIC_ARENA_DAMPENING, EFFECT_0))
{
AddPct(amount, dampening->GetAmount());
}
// Battleground - Dampening
else if (AuraEffect const* dampening = caster->GetAuraEffect(SPELL_GENERIC_BATTLEGROUND_DAMPENING, EFFECT_0))
AddPct(amount, dampening->GetAmount());
else if (AuraEffect const* dampening2 = caster->GetAuraEffect(SPELL_GENERIC_BATTLEGROUND_DAMPENING, EFFECT_0))
{
AddPct(amount, dampening2->GetAmount());
}
}
}
@@ -1259,8 +1263,10 @@ public:
holy += eventInfo.GetProcTarget()->SpellBaseDamageBonusTaken(SPELL_SCHOOL_MASK_HOLY);
// Xinef: Libram of Divine Purpose
if (AuraEffect* aurEff = GetTarget()->GetDummyAuraEffect(SPELLFAMILY_PALADIN, 2025, EFFECT_0))
holy += aurEff->GetAmount();
if (AuraEffect* aurEffPaladin = GetTarget()->GetDummyAuraEffect(SPELLFAMILY_PALADIN, 2025, EFFECT_0))
{
holy += aurEffPaladin->GetAmount();
}
int32 bp = std::max<int32>(0, int32((ap * 0.022f + 0.044f * holy) * GetTarget()->GetAttackTime(BASE_ATTACK) / 1000));
GetTarget()->CastCustomSpell(SPELL_PALADIN_SEAL_OF_RIGHTEOUSNESS, SPELLVALUE_BASE_POINT0, bp, eventInfo.GetProcTarget(), true, nullptr, aurEff);