[11801] Implement spell 43498

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
Xfurry 2011-09-22 15:59:45 +02:00 committed by Schmoozerd
parent 9072571b6f
commit 46e869a454
2 changed files with 25 additions and 1 deletions

View file

@ -1430,6 +1430,30 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
unitTarget->RemoveAurasDueToSpell(6606);
return;
}
case 43498: // Siphon Soul
{
// This spell should cast the next spell only for one (player)target, however it should hit multiple targets, hence this kind of implementation
if (!unitTarget || m_UniqueTargetInfo.rbegin()->targetGUID != unitTarget->GetObjectGuid())
return;
std::vector<Unit*> possibleTargets;
possibleTargets.reserve(m_UniqueTargetInfo.size());
for (std::list<TargetInfo>::const_iterator itr = m_UniqueTargetInfo.begin(); itr != m_UniqueTargetInfo.end(); itr++)
{
// Skip Non-Players
if (!itr->targetGUID.IsPlayer())
continue;
if (Unit* target = m_caster->GetMap()->GetPlayer(itr->targetGUID))
possibleTargets.push_back(target);
}
// Cast Siphon Soul channeling spell
if (!possibleTargets.empty())
m_caster->CastSpell(possibleTargets[urand(0, possibleTargets.size()-1)], 43501, false);
return;
}
case 43572: // Send Them Packing: On /Raise Emote Dummy to Player
{
if (!unitTarget)

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "11800"
#define REVISION_NR "11801"
#endif // __REVISION_NR_H__