This commit is contained in:
heyitsbench
2024-06-15 23:53:16 -04:00
parent 5dae761a94
commit 9fc2adf3b7
3 changed files with 48 additions and 9 deletions

View File

@@ -7833,19 +7833,17 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
triggered_spell_id = 31803;
// On target with 5 stacks of Holy Vengeance direct damage is done
if (Aura* aur = victim->GetAura(triggered_spell_id, GetGUID()))
{
if (aur->GetStackAmount() == 5)
{
if (stacker)
aur->RefreshDuration();
CastSpell(victim, 42463, true, castItem, triggeredByAura);
return true;
}
}
CastSpell(victim, 42463, true, castItem, triggeredByAura);
if (!stacker)
return false;
break;
@@ -7866,19 +7864,17 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
triggered_spell_id = 53742;
// On target with 5 stacks of Blood Corruption direct damage is done
if (Aura* aur = victim->GetAura(triggered_spell_id, GetGUID()))
{
if (aur->GetStackAmount() == 5)
{
if (stacker)
aur->RefreshDuration();
CastSpell(victim, 53739, true, castItem, triggeredByAura);
return true;
}
}
CastSpell(victim, 53739, true, castItem, triggeredByAura);
if (!stacker)
return false;
break;

View File

@@ -90,7 +90,11 @@ 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,
};
enum PaladinSpellIcons
@@ -1105,6 +1109,40 @@ 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);
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 +1170,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);
}