[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

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

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "10723" #define REVISION_NR "10724"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__