aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortobmaps <spambot42@yandex.ru>2011-05-13 00:24:20 +0700
committertobmaps <spambot42@yandex.ru>2011-05-13 00:24:20 +0700
commit92e19ee3c11b000b25d3f4664f27bbd75561b243 (patch)
tree0f761c372d94925b7a50836227b2587e67009d0d /src
parent942694a871f5a14fb6d5092b5888bd452f13580d (diff)
Core/Spells: Fix Glyph of Divinity
Diffstat (limited to 'src')
-rwxr-xr-xsrc/server/game/Entities/Unit/Unit.cpp32
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: