aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVincent-Michael <Vincent_Michael@gmx.de>2013-06-28 22:13:38 +0200
committerVincent-Michael <Vincent_Michael@gmx.de>2013-06-28 22:13:38 +0200
commit23fcda3481c74969eb1333d02bd01bc8d84e4ec8 (patch)
treecafc09e2666ae4df66d808b037cb6c0f22ec6aec /src
parent7cc6dfaebc35af1b7015c6d5a3a9b367b8a36d95 (diff)
Core/Spells: Fix paladin talent "Eye for an Eye"
Note: Add proc flags hack (default proc flags not working)
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Spells/spell_paladin.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp
index ac9b861f584..fd4e560b1b7 100644
--- a/src/server/scripts/Spells/spell_paladin.cpp
+++ b/src/server/scripts/Spells/spell_paladin.cpp
@@ -46,6 +46,7 @@ enum PaladinSpells
SPELL_PALADIN_DIVINE_STORM_DUMMY = 54171,
SPELL_PALADIN_DIVINE_STORM_HEAL = 54172,
+ SPELL_PALADIN_EYE_FOR_AN_EYE_RANK_1 = 9799,
SPELL_PALADIN_EYE_FOR_AN_EYE_DAMAGE = 25997,
SPELL_PALADIN_FORBEARANCE = 25771,
@@ -456,17 +457,16 @@ class spell_pal_eye_for_an_eye : public SpellScriptLoader
return true;
}
- void OnProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
+ void HandleEffectProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
{
PreventDefaultAction();
- // return damage % to attacker but < 50% own total health
- int32 damage = int32(std::min(CalculatePct(eventInfo.GetDamageInfo()->GetDamage(), aurEff->GetAmount()), GetTarget()->GetMaxHealth() / 2));
+ int32 damage = CalculatePct(eventInfo.GetDamageInfo()->GetDamage(), aurEff->GetAmount());
GetTarget()->CastCustomSpell(SPELL_PALADIN_EYE_FOR_AN_EYE_DAMAGE, SPELLVALUE_BASE_POINT0, damage, eventInfo.GetProcTarget(), true, NULL, aurEff);
}
void Register()
{
- OnEffectProc += AuraEffectProcFn(spell_pal_eye_for_an_eye_AuraScript::OnProc, EFFECT_0, SPELL_AURA_DUMMY);
+ OnEffectProc += AuraEffectProcFn(spell_pal_eye_for_an_eye_AuraScript::HandleEffectProc, EFFECT_0, m_scriptSpellId == SPELL_PALADIN_EYE_FOR_AN_EYE_RANK_1 ? SPELL_AURA_DUMMY : SPELL_AURA_PROC_TRIGGER_SPELL);
}
};