From bf7e46a7f855a1d8b2b7f8fa91f34c8c04c4fb01 Mon Sep 17 00:00:00 2001 From: przemratajczak Date: Fri, 13 Apr 2012 00:59:48 +0200 Subject: [PATCH] [11956] Implement spells 28374, 54426 and 71123 (Decimate) Thanks to piroy1337 for version of ICC Decimate, thanks to ZuSe for bumping the issue of missing implementation Signed-off-by: Schmoozerd --- src/game/SpellEffects.cpp | 14 ++++++++++++++ src/shared/revision_nr.h | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 1cf529418..74d53adcb 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -6606,6 +6606,20 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx) unitTarget->CastSpell(unitTarget, 27699, true); return; } + case 28374: // Decimate (Naxxramas: Gluth) + case 54426: // Decimate (Naxxramas: Gluth (spells are identical)) + case 71123: // Decimate (ICC: Precious / Stinky) + { + if (!unitTarget) + return; + + float downToHealthPercent = (m_spellInfo->Id != 71123 ? 5 : m_spellInfo->CalculateSimpleValue(eff_idx)) * 0.01f; + + int32 damage = unitTarget->GetHealth() - unitTarget->GetMaxHealth() * downToHealthPercent; + if (damage > 0) + m_caster->CastCustomSpell(unitTarget, 28375, &damage, NULL, NULL, true); + return; + } case 28560: // Summon Blizzard { if (!unitTarget) diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 4403b7a40..caa218fb7 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 "11955" + #define REVISION_NR "11956" #endif // __REVISION_NR_H__