fix(Scripts/Spells): Implement damage scaling based off DoT stack count for Seal of Vengeance and Corruption. (#19073)

* Init.

* Whoops.

* Move comment.

Someone should fix this darn CI.

* Logic adjustment.

* Revert logic adjustment.

This reverts commit ee09ee55df47c9a66ecf536be58a4a040f384b72.

* Requested changes?
This commit is contained in:
Benjamin Jackson
2024-06-18 18:45:02 -04:00
committed by GitHub
parent e3789db379
commit 8ea13ca778
3 changed files with 54 additions and 9 deletions

View File

@@ -90,7 +90,12 @@ enum PaladinSpells
// Crystalforge Raiment - Tier 5 Holy 2 Set
SPELL_IMPROVED_JUDGEMENT = 37188,
SPELL_IMPROVED_JUDGEMENT_ENERGIZE = 43838
SPELL_IMPROVED_JUDGEMENT_ENERGIZE = 43838,
SPELL_PALADIN_HOLY_VENGEANCE = 31803,
SPELL_PALADIN_BLOOD_CORRUPTION = 53742,
SPELL_PALADIN_SEAL_OF_VENGEANCE_EFFECT = 42463,
SPELL_PALADIN_SEAL_OF_CORRUPTION_EFFECT = 53739
};
enum PaladinSpellIcons
@@ -1105,6 +1110,45 @@ class spell_pal_seal_of_righteousness : public AuraScript
}
};
// 42463 - Seal of Vengeance
// 53739 - Seal of Corruption
class spell_pal_seal_of_vengeance : public SpellScript
{
PrepareSpellScript(spell_pal_seal_of_vengeance);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_PALADIN_SEAL_OF_VENGEANCE_EFFECT, SPELL_PALADIN_SEAL_OF_CORRUPTION_EFFECT });
}
void HandleScriptEffect(SpellEffIndex /*effIndex*/)
{
Unit* target = GetExplTargetUnit();
uint32 spellId = GetSpell()->GetSpellInfo()->Id;
uint32 auraId = (spellId == SPELL_PALADIN_SEAL_OF_VENGEANCE_EFFECT)
? SPELL_PALADIN_HOLY_VENGEANCE
: SPELL_PALADIN_BLOOD_CORRUPTION;
int32 damage = GetHitDamage();
uint8 stacks = 0;
if (target)
{
Aura* aura = target->GetAura(auraId, GetCaster()->GetGUID());
if (aura)
stacks = aura->GetStackAmount();
damage = ((damage * stacks) / 5);
SetHitDamage(damage);
}
}
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_pal_seal_of_vengeance::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_WEAPON_PERCENT_DAMAGE);
}
};
void AddSC_paladin_spell_scripts()
{
RegisterSpellAndAuraScriptPair(spell_pal_seal_of_command, spell_pal_seal_of_command_aura);
@@ -1132,5 +1176,6 @@ void AddSC_paladin_spell_scripts()
RegisterSpellScript(spell_pal_lay_on_hands);
RegisterSpellScript(spell_pal_righteous_defense);
RegisterSpellScript(spell_pal_seal_of_righteousness);
RegisterSpellScript(spell_pal_seal_of_vengeance);
}