aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Spells
diff options
context:
space:
mode:
authormik1893 <michele.roscelli@gmail.com>2016-06-12 10:47:29 +0100
committerGitHub <noreply@github.com>2016-06-12 10:47:29 +0100
commit3d31e2a157c18fb2ce0c676d6195b4f24ca47fae (patch)
tree22ad039035f770c9ae15a85dbc2a8815a6644beb /src/server/scripts/Spells
parentcc521d49dc159d9f4fb043b815d44d33ac810375 (diff)
Core/Spells: fix issue with Illumination talent (broken in #17122) (#17350)
Diffstat (limited to 'src/server/scripts/Spells')
-rw-r--r--src/server/scripts/Spells/spell_paladin.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp
index eed84d4ff6b..6de95af8d8f 100644
--- a/src/server/scripts/Spells/spell_paladin.cpp
+++ b/src/server/scripts/Spells/spell_paladin.cpp
@@ -898,19 +898,19 @@ public:
// 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);
}
}
}