mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 07:37:03 +00:00
[11801] Implement spell 43498
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
parent
9072571b6f
commit
46e869a454
2 changed files with 25 additions and 1 deletions
|
|
@ -1430,6 +1430,30 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
|
||||||
unitTarget->RemoveAurasDueToSpell(6606);
|
unitTarget->RemoveAurasDueToSpell(6606);
|
||||||
return;
|
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
|
case 43572: // Send Them Packing: On /Raise Emote Dummy to Player
|
||||||
{
|
{
|
||||||
if (!unitTarget)
|
if (!unitTarget)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "11800"
|
#define REVISION_NR "11801"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue