Core/Spells: Eye for an Eye will now deal damage to the attacker instead of attempting (and failing) to target the caster himself
This commit is contained in:
1 parent
3c2d2880b7
commit
24b84ba980
2 files changed
+9
-1
No files matched your search
@@ -0,0 +1 @@
|
||||
UPDATE `spell_proc` SET `HitMask`= 0 WHERE `SpellId`= -9799;
|
||||
@@ -450,15 +450,22 @@ class spell_pal_eye_for_an_eye : public AuraScript
|
||||
return ValidateSpellInfo({ SPELL_PALADIN_EYE_FOR_AN_EYE_DAMAGE });
|
||||
}
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
return eventInfo.GetDamageInfo() && eventInfo.GetDamageInfo()->GetDamage() > 0;
|
||||
}
|
||||
|
||||
void HandleEffectProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
int32 damage = CalculatePct(eventInfo.GetDamageInfo()->GetDamage(), aurEff->GetAmount());
|
||||
GetTarget()->CastSpell(eventInfo.GetProcTarget(), SPELL_PALADIN_EYE_FOR_AN_EYE_DAMAGE, CastSpellExtraArgs(aurEff).AddSpellBP0(damage));
|
||||
if (damage)
|
||||
GetTarget()->CastSpell(eventInfo.GetActor(), SPELL_PALADIN_EYE_FOR_AN_EYE_DAMAGE, CastSpellExtraArgs(aurEff).AddSpellBP0(damage));
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoCheckProc.Register(&spell_pal_eye_for_an_eye::CheckProc);
|
||||
OnEffectProc.Register(&spell_pal_eye_for_an_eye::HandleEffectProc, EFFECT_0, m_scriptSpellId == SPELL_PALADIN_EYE_FOR_AN_EYE_RANK_1 ? SPELL_AURA_DUMMY : SPELL_AURA_PROC_TRIGGER_SPELL);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user