From 8d558ee2007fa8e0ad7d7bd42382495116a482eb Mon Sep 17 00:00:00 2001 From: kid 10 Date: Sat, 13 Aug 2011 19:12:46 +0200 Subject: [PATCH] [12039] Implement spells 66118 67630 68646 68647 --- src/game/SpellAuras.cpp | 22 ++++++++++++++++++++++ src/shared/revision_nr.h | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 77c35e518..ee28bd337 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -8024,6 +8024,28 @@ void Aura::PeriodicDummyTick() target->CastSpell(target, 62593, true); return; } + case 66118: // Leeching Swarm + case 67630: // Leeching Swarm + case 68646: // Leeching Swarm + case 68647: // Leeching Swarm + { + Unit* caster = GetCaster(); + if (!caster) + return; + + int32 lifeLeeched = int32(target->GetHealth() * m_modifier.m_amount * 0.01f); + + if (lifeLeeched < 250) + lifeLeeched = 250; + + // Leeching swarm damage + caster->CastCustomSpell(target, 66240, &lifeLeeched, NULL, NULL, true, NULL, this); + + // Leeching swarm heal + target->CastCustomSpell(caster, 66125, &lifeLeeched, NULL, NULL, true, NULL, this); + + return; + } case 68875: // Wailing Souls case 68876: // Wailing Souls { diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index c2e7b681f..71cd3db6b 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 "12038" + #define REVISION_NR "12039" #endif // __REVISION_NR_H__