mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 10:26:28 +01:00
*Do not always add target to aoe map with target number limit.
--HG-- branch : trunk
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user