[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 <schmoozerd@scriptdev2.com>
This commit is contained in:
przemratajczak 2012-04-13 00:59:48 +02:00 committed by Schmoozerd
parent af6b589041
commit bf7e46a7f8
2 changed files with 15 additions and 1 deletions

View file

@ -6606,6 +6606,20 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
unitTarget->CastSpell(unitTarget, 27699, true); unitTarget->CastSpell(unitTarget, 27699, true);
return; 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 case 28560: // Summon Blizzard
{ {
if (!unitTarget) if (!unitTarget)

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 "11955" #define REVISION_NR "11956"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__