From 008ddbf19785453a40a3446f1637ca9d3cb8fdaa Mon Sep 17 00:00:00 2001 From: ariel- Date: Mon, 3 Apr 2017 00:51:56 -0300 Subject: Core/Scripts: fix Judgement of Wisdom mana return Closes #19400 --- src/server/scripts/Spells/spell_paladin.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/server') 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(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(caster->GetCreateMana()), spellInfo->Effects[EFFECT_0].CalcValue()); + caster->CastCustomSpell(spellInfo->Id, SPELLVALUE_BASE_POINT0, amount, (Unit*)nullptr, true, nullptr, aurEff, GetCasterGUID()); } void Register() override -- cgit v1.2.3