Core/Spells: Allow AoE spells to target dead units.

Also removes some unneeded checks from ally targeting.

--HG--
branch : trunk
This commit is contained in:
linencloth
2010-09-15 06:33:38 +02:00
parent ec5edaf6bf
commit a582ab9d9d
4 changed files with 16 additions and 8 deletions
+2 -1
View File
@@ -1875,7 +1875,8 @@ void Spell::SearchAreaTarget(std::list<Unit*> &TagUnitMap, float radius, SpellNo
break;
}
Trinity::SpellNotifierCreatureAndPlayer notifier(m_caster, TagUnitMap, radius, type, TargetType, pos, entry);
bool requireDeadTarget = bool(m_spellInfo->AttributesEx3 & SPELL_ATTR_EX3_REQUIRE_DEAD_TARGET);
Trinity::SpellNotifierCreatureAndPlayer notifier(m_caster, TagUnitMap, radius, type, TargetType, pos, entry, requireDeadTarget);
if ((m_spellInfo->AttributesEx3 & SPELL_ATTR_EX3_PLAYERS_ONLY)
|| (TargetType == SPELL_TARGETS_ENTRY && !entry))
m_caster->GetMap()->VisitWorld(pos->m_positionX, pos->m_positionY, radius, notifier);