From 1e9483111dc5435e649396bd932cd2b5b71efc6f Mon Sep 17 00:00:00 2001 From: hunuza Date: Wed, 5 Aug 2009 10:14:45 +0200 Subject: [PATCH] Fix 49998 and ranks healing part. Signed-off-by: hunuza --- src/game/SpellEffects.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 250edf301..2fc85cf69 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -1860,6 +1860,28 @@ void Spell::EffectDummy(uint32 i) m_caster->CastSpell(m_caster, 51209, true); return; } + // Death Strike + else if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000000000000010)) + { + uint32 count = 0; + Unit::AuraMap const& auras = unitTarget->GetAuras(); + for(Unit::AuraMap::const_iterator itr = auras.begin(); itr!=auras.end(); ++itr) + { + if(itr->second->GetSpellProto()->Dispel == DISPEL_DISEASE && + itr->second->GetCasterGUID() == m_caster->GetGUID() && + IsSpellLastAuraEffect(itr->second->GetSpellProto(), itr->second->GetEffIndex())) + { + ++count; + // max. 15% + if(count == 3) + break; + } + } + + int32 bp = count * m_caster->GetMaxHealth() * m_spellInfo->DmgMultiplier[0] / 100; + m_caster->CastCustomSpell(m_caster, 45470, &bp, NULL, NULL, true); + return; + } break; }