diff options
author | ariel- <ariel-@users.noreply.github.com> | 2017-04-03 00:51:56 -0300 |
---|---|---|
committer | ariel- <ariel-@users.noreply.github.com> | 2017-04-03 00:51:56 -0300 |
commit | 008ddbf19785453a40a3446f1637ca9d3cb8fdaa (patch) | |
tree | 8440031566d1a2459fad041fee1e9a12fc8ebe78 | |
parent | 270a6396783ccb2b8dff181fca2760adb47d2110 (diff) |
Core/Scripts: fix Judgement of Wisdom mana return
Closes #19400
-rw-r--r-- | src/server/scripts/Spells/spell_paladin.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp index 3bff94db074..9bead494492 100644 --- a/src/server/scripts/Spells/spell_paladin.cpp +++ b/src/server/scripts/Spells/spell_paladin.cpp @@ -1592,10 +1592,11 @@ class spell_pal_judgement_of_wisdom_mana : public SpellScriptLoader { PreventDefaultAction(); - Unit* caster = eventInfo.GetProcTarget(); - int32 amount = CalculatePct(static_cast<int32>(caster->GetCreateMana()), aurEff->GetAmount()); + SpellInfo const* spellInfo = sSpellMgr->AssertSpellInfo(SPELL_PALADIN_JUDGEMENT_OF_WISDOM_MANA); - caster->CastCustomSpell(SPELL_PALADIN_JUDGEMENT_OF_WISDOM_MANA, SPELLVALUE_BASE_POINT0, amount, (Unit*)nullptr, true, nullptr, aurEff, GetCasterGUID()); + Unit* caster = eventInfo.GetProcTarget(); + int32 const amount = CalculatePct(static_cast<int32>(caster->GetCreateMana()), spellInfo->Effects[EFFECT_0].CalcValue()); + caster->CastCustomSpell(spellInfo->Id, SPELLVALUE_BASE_POINT0, amount, (Unit*)nullptr, true, nullptr, aurEff, GetCasterGUID()); } void Register() override |