Skip to content

Commit

Permalink
Core/Spells: fix issue with Illumination talent (broken in #17122) (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
mik1893 committed Jun 12, 2016
1 parent cc521d4 commit 3d31e2a
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/server/scripts/Spells/spell_paladin.cpp
Expand Up @@ -898,19 +898,19 @@ class spell_pal_illumination : public SpellScriptLoader
// this script is valid only for the Holy Shock procs of illumination
if (eventInfo.GetHealInfo() && eventInfo.GetHealInfo()->GetSpellInfo())
{
SpellInfo const* originalSpell = nullptr;

// if proc comes from the Holy Shock heal, need to get mana cost of original spell - else it's the original heal itself
if (eventInfo.GetHealInfo()->GetSpellInfo()->SpellFamilyFlags[1] & 0x00010000)
originalSpell = sSpellMgr->GetSpellInfo(sSpellMgr->GetSpellWithRank(SPELL_PALADIN_HOLY_SHOCK_R1, eventInfo.GetHealInfo()->GetSpellInfo()->GetRank()));
else
originalSpell = eventInfo.GetHealInfo()->GetSpellInfo();

if (originalSpell && aurEff->GetSpellInfo())
{
PreventDefaultAction();
Unit* target = eventInfo.GetActor(); // Paladin is the target of the energize

// proc comes from the Holy Shock heal, need to get mana cost of original spell
uint32 originalspellid = sSpellMgr->GetSpellWithRank(SPELL_PALADIN_HOLY_SHOCK_R1, eventInfo.GetHealInfo()->GetSpellInfo()->GetRank());
SpellInfo const* originalSpell = sSpellMgr->GetSpellInfo(originalspellid);
if (originalSpell && aurEff->GetSpellInfo())
{
uint32 bp = CalculatePct(originalSpell->CalcPowerCost(target, originalSpell->GetSchoolMask()), aurEff->GetSpellInfo()->Effects[EFFECT_1].CalcValue());
target->CastCustomSpell(SPELL_PALADIN_ILLUMINATION_ENERGIZE, SPELLVALUE_BASE_POINT0, bp, target, true, nullptr, aurEff);
}
uint32 bp = CalculatePct(originalSpell->CalcPowerCost(target, originalSpell->GetSchoolMask()), aurEff->GetSpellInfo()->Effects[EFFECT_1].CalcValue());
target->CastCustomSpell(SPELL_PALADIN_ILLUMINATION_ENERGIZE, SPELLVALUE_BASE_POINT0, bp, target, true, nullptr, aurEff);
}
}
}
Expand Down

0 comments on commit 3d31e2a

Please sign in to comment.