aboutsummaryrefslogtreecommitdiff
path: root/src/game/SpellAuras.cpp
diff options
context:
space:
mode:
authorspp <none@none>2009-12-13 11:35:12 +0100
committerspp <none@none>2009-12-13 11:35:12 +0100
commit3fc61524ffe12a6790a3438cd8cd324c5b363c60 (patch)
tree208d521919d9217d1c190e110d916961fb9cc779 /src/game/SpellAuras.cpp
parentc72387cce87cdc63ec6a3cddae1682828166d92b (diff)
Implementation of glyph of Power Word: Shield. By rammbonr5, closes #411
--HG-- branch : trunk
Diffstat (limited to 'src/game/SpellAuras.cpp')
-rw-r--r--src/game/SpellAuras.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 27679b20b7c..2f533e8bfff 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -1579,6 +1579,26 @@ void AuraEffect::HandleAuraEffectSpecificMods(bool apply, bool Real, bool change
DoneActualBenefit *= caster->CalculateLevelPenalty(GetSpellProto());
m_amount += (int32)DoneActualBenefit;
}
+
+ // we have exact amount now so apply mods affecting all boni
+ switch (m_spellProto->SpellFamilyName)
+ {
+ case SPELLFAMILY_PRIEST:
+ // Glyph of Power Word: Shield
+ if (m_spellProto->SpellFamilyFlags[0] & 0x1 && m_spellProto->SpellFamilyFlags[2] & 0x400 &&
+ GetAuraName() == SPELL_AURA_SCHOOL_ABSORB)
+ {
+ if (AuraEffect* glyph = caster->GetAuraEffect(55672,0))
+ {
+ // instantly heal m_amount% of the absorb-value
+ int32 heal = (glyph->GetAmount() * m_amount)/100;
+ caster->CastCustomSpell(m_target, 56160, &heal, NULL, NULL, true, 0, this);
+ }
+ }
+ break;
+ default:
+ break;
+ }
}
}
}