diff options
-rwxr-xr-x | src/server/game/Entities/Unit/Unit.cpp | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index e0cff6723ae..c62e4261cf4 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; i<MAX_SPELL_EFFECTS; i++) - if (procSpell->Effect[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; i<MAX_SPELL_EFFECTS; i++) + { + if (procSpell->Effect[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: |