Core/Spells: Fix Glyph of Divinity

This commit is contained in:
tobmaps
2011-05-13 00:24:20 +07:00
parent 942694a871
commit 92e19ee3c1
+19 -13
View File
@@ -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: