From 7dfeddbdeff0207c07c9acdffa91ef897027a500 Mon Sep 17 00:00:00 2001 From: Den Date: Sat, 25 Jun 2011 06:19:36 +0400 Subject: [PATCH] [11672] Implement glyph 42414. Signed-off-by: VladimirMangos --- src/game/Unit.cpp | 17 +++++++++++++++-- src/shared/revision_nr.h | 2 +- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index a71cf7de7..950b75676 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -6460,14 +6460,27 @@ uint32 Unit::SpellDamageBonusDone(Unit *pVictim, SpellEntry const *spellProto, u } case SPELLFAMILY_PRIEST: { - // Glyph of Smite - if (spellProto->SpellFamilyFlags & UI64LIT(0x00000080)) + // Smite + if (spellProto->IsFitToFamilyMask(UI64LIT(0x0000000000000080))) { // Holy Fire if (pVictim->GetAura(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_PRIEST, UI64LIT(0x00100000))) + // Glyph of Smite if (Aura *aur = GetAura(55692, EFFECT_INDEX_0)) DoneTotalMod *= (aur->GetModifier()->m_amount+100.0f) / 100.0f; } + // Shadow word: Death + else if (spellProto->IsFitToFamilyMask(UI64LIT(0x0000000200000000))) + { + // Glyph of Shadow word: Death + if (SpellAuraHolder const* glyph = GetSpellAuraHolder(55682)) + { + Aura const* hpPct = glyph->GetAuraByEffectIndex(EFFECT_INDEX_0); + Aura const* dmPct = glyph->GetAuraByEffectIndex(EFFECT_INDEX_1); + if (hpPct && dmPct && pVictim->GetHealth() * 100 <= pVictim->GetMaxHealth() * hpPct->GetModifier()->m_amount) + DoneTotalMod *= (dmPct->GetModifier()->m_amount + 100.0f) / 100.0f; + } + } break; } case SPELLFAMILY_DRUID: diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 878772ecb..dd1b431ec 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "11671" + #define REVISION_NR "11672" #endif // __REVISION_NR_H__