[10724] Fix TARGET_AREAEFFECT_CUSTOM, need to obey type when DB target entry exist

Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
NoFantasy 2010-11-15 18:04:26 +01:00
parent ec974656ac
commit 8a1c5bd800
2 changed files with 10 additions and 2 deletions

View file

@ -1823,7 +1823,15 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
if ((*iter)->GetEntry() == i_spellST->second.targetEntry)
{
targetUnitMap.push_back((*iter));
if (i_spellST->second.type == SPELL_TARGET_TYPE_DEAD && ((Creature*)(*iter))->IsCorpse())
{
targetUnitMap.push_back((*iter));
}
else if (i_spellST->second.type == SPELL_TARGET_TYPE_CREATURE && (*iter)->isAlive())
{
targetUnitMap.push_back((*iter));
}
break;
}
}