[12020] Implement targeting for spell 30843

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
Reamer 2012-06-25 15:02:03 +02:00 committed by Schmoozerd
parent 01b6c6b8f4
commit e533ff54d5
2 changed files with 9 additions and 5 deletions

View file

@ -1668,8 +1668,8 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
case 71221: // Gas spore (Mode 1) (ICC, Festergut)
unMaxTargets = 4;
break;
case 30843: // Enfeeble TODO: exclude top threat target from target selection
case 42005: // Bloodboil TODO: need to be 5 targets(players) furthest away from caster
case 30843: // Enfeeble
case 42005: // Bloodboil
case 45641: // Fire Bloom (SWP, Kil'jaeden)
case 55665: // Life Drain (h)
case 58917: // Consume Minions
@ -2062,15 +2062,19 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
case TARGET_ALL_ENEMY_IN_AREA:
FillAreaTargets(targetUnitMap, radius, PUSH_DEST_CENTER, SPELL_TARGETS_AOE_DAMAGE);
if (m_spellInfo->Id == 42005) // Bloodboil
if (m_spellInfo->Id == 42005) // Bloodboil (spell hits only the 5 furthest away targets)
{
// manually cuting, because the spell hits only the 5 furthest away targets
if (targetUnitMap.size() > unMaxTargets)
{
targetUnitMap.sort(TargetDistanceOrderFarAway(m_caster));
targetUnitMap.resize(unMaxTargets);
}
}
else if (m_spellInfo->Id == 30843) // Enfeeble (do not target current victim)
{
if (Unit* pVictim = m_caster->getVictim())
targetUnitMap.remove(pVictim);
}
break;
case TARGET_AREAEFFECT_INSTANT:
{

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "12019"
#define REVISION_NR "12020"
#endif // __REVISION_NR_H__