*Do not always add target to aoe map with target number limit.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-03-18 15:28:19 -06:00
parent e440f13402
commit f11d41b9ce

View File

@@ -1990,14 +1990,10 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap)
break;
}
if(unMaxTargets && TagUnitMap.size() > 1)
if(unMaxTargets && !EffectChainTarget && TagUnitMap.size() > 1)
{
if(m_targets.getUnitTarget())
{
if(m_spellInfo->Id == 5246) //Intimidating Shout
TagUnitMap.remove(m_targets.getUnitTarget());
if(m_spellInfo->Id != 5246) //Intimidating Shout
--unMaxTargets;
}
// remove random units from the map
std::list<Unit*>::iterator itr;
@@ -2007,10 +2003,6 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap)
advance(itr, urand(0, TagUnitMap.size() - 1));
TagUnitMap.erase(itr);
}
// the player's target will always be added to the map
if(m_targets.getUnitTarget() && m_spellInfo->Id != 5246)
TagUnitMap.push_back(m_targets.getUnitTarget());
}
}