[9557] Move the code of glyph 55672 to a better place

Signed-off-by: Lightguard <Lightguard@tauri.hu>
This commit is contained in:
KAPATEJIb 2010-03-09 10:02:20 +01:00 committed by Lightguard
parent 3d3348e485
commit c5d43bfd16
3 changed files with 16 additions and 12 deletions

View file

@ -6251,6 +6251,21 @@ void Aura::HandleSpellSpecificBoosts(bool apply)
else
return;
}
// Power Word: Shield
else if (apply && m_spellProto->SpellFamilyFlags & UI64LIT(0x0000000000000001) && m_spellProto->Mechanic == MECHANIC_SHIELD)
{
Unit* caster = GetCaster();
if(!caster)
return;
// Glyph of Power Word: Shield
if(Aura* glyph = caster->GetAura(55672,0))
{
int32 heal = (glyph->GetModifier()->m_amount * m_modifier.m_amount)/100;
caster->CastCustomSpell(m_target, 56160, &heal, NULL, NULL, true, 0, this);
}
return;
}
switch(GetId())
{

View file

@ -1991,17 +1991,6 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe
preventDeathAmount = (*i)->GetModifier()->m_amount;
continue;
}
// Power Word: Shield
if (spellProto->SpellFamilyFlags & UI64LIT(00000001) && spellProto->Mechanic == MECHANIC_SHIELD)
{
// Glyph of Power Word: Shield
if (Aura *glyph = pVictim->GetAura(55672, EFFECT_INDEX_0))
{
int32 heal = int32(glyph->GetModifier()->m_amount *
(RemainingDamage >= currentAbsorb ? currentAbsorb : RemainingDamage) / 100);
pVictim->CastCustomSpell(pVictim, 56160, &heal, NULL, NULL, true, 0, *i);
}
}
// Reflective Shield
if (spellProto->SpellFamilyFlags == 0x1 && canReflect)
{

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "9556"
#define REVISION_NR "9557"
#endif // __REVISION_NR_H__