From 92e19ee3c11b000b25d3f4664f27bbd75561b243 Mon Sep 17 00:00:00 2001 From: tobmaps Date: Fri, 13 May 2011 00:24:20 +0700 Subject: [PATCH] Core/Spells: Fix Glyph of Divinity --- src/server/game/Entities/Unit/Unit.cpp | 32 +++++++++++++++----------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index e0cff6723a..c62e4261cf 100755 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -6819,19 +6819,6 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger break; } - // Glyph of Divinity - case 54939: - { - // Lookup base amount mana restore - for (uint8 i=0; iEffect[i] == SPELL_EFFECT_ENERGIZE) - { - int32 mana = SpellMgr::CalculateSpellEffectAmount(procSpell, i); - CastCustomSpell(this, 54986, 0, &mana, 0, true, castItem, triggeredByAura); - break; - } - return true; - } // Glyph of Holy Light case 54937: { @@ -7910,6 +7897,25 @@ bool Unit::HandleAuraProc(Unit * pVictim, uint32 damage, Aura * triggeredByAura, return true; } } + // Glyph of Divinity + else if (dummySpell->Id == 54939) + { + *handled = true; + // Check if we are the target and prevent mana gain + if (triggeredByAura->GetCasterGUID() == pVictim->GetGUID()) + return false; + // Lookup base amount mana restore + for (uint8 i=0; iEffect[i] == SPELL_EFFECT_ENERGIZE) + { + // value multiplied by 2 because you should get twice amount + int32 mana = SpellMgr::CalculateSpellEffectAmount(procSpell, i) * 2; + CastCustomSpell(this, 54986, 0, &mana, NULL, true); + } + } + return true; + } break; } case SPELLFAMILY_MAGE: