Skip to content

Commit

Permalink
[10724] Fix TARGET_AREAEFFECT_CUSTOM, need to obey type when DB targe…
Browse files Browse the repository at this point in the history
…t entry exist

Signed-off-by: NoFantasy <nofantasy@nf.no>
  • Loading branch information
NoFantasy committed Nov 15, 2010
1 parent 2c861ed commit 833d642
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion src/game/Spell.cpp
Expand Up @@ -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;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "10723"
#define REVISION_NR "10724"
#endif // __REVISION_NR_H__

0 comments on commit 833d642

Please sign in to comment.