[8920] Fixed glyph 42408 by move code to more correct place.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
Splinter 2009-12-06 00:37:43 +03:00 committed by VladimirMangos
parent 6094d2368b
commit 155ea6f40a
3 changed files with 12 additions and 22 deletions

View file

@ -6259,26 +6259,6 @@ void Aura::HandleSchoolAbsorb(bool apply, bool Real)
DoneActualBenefit *= caster->CalculateLevelPenalty(GetSpellProto()); DoneActualBenefit *= caster->CalculateLevelPenalty(GetSpellProto());
m_modifier.m_amount += (int32)DoneActualBenefit; m_modifier.m_amount += (int32)DoneActualBenefit;
// now that the correct amount is computed, apply caster aura, if any
switch(m_spellProto->SpellFamilyName)
{
case SPELLFAMILY_PRIEST:
// Power Word: Shield
if (m_spellProto->SpellFamilyFlags & UI64LIT(0x0000000000000001))
{
// Glyph of Power Word: Shield
if(Aura* glyph = caster->GetAura(55672,0))
{
// instant heal glyph m_amount% of the absorbed amount
int32 heal = (glyph->GetModifier()->m_amount * m_modifier.m_amount)/100;
caster->CastCustomSpell(m_target, 56160, &heal, NULL, NULL, true, 0, this);
}
}
break;
default:
break;
}
} }
} }
else else

View file

@ -1841,7 +1841,17 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe
preventDeathAmount = (*i)->GetModifier()->m_amount; preventDeathAmount = (*i)->GetModifier()->m_amount;
continue; continue;
} }
// Power Word: Shield
if (spellProto->SpellFamilyFlags & UI64LIT(00000001) && spellProto->Mechanic == MECHANIC_SHIELD)
{
// Glyph of Power Word: Shield
if (Aura *glyph = pVictim->GetAura(55672,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 // Reflective Shield
if (spellProto->SpellFamilyFlags == 0x1 && canReflect) if (spellProto->SpellFamilyFlags == 0x1 && canReflect)
{ {

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "8919" #define REVISION_NR "8920"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__