diff options
Diffstat (limited to 'src/game/Spell.cpp')
-rw-r--r-- | src/game/Spell.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 4396c2f94f1..ee9855dea09 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -2016,14 +2016,7 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap) if(m_spellInfo->Id == 5246) //Intimidating Shout TagUnitMap.remove(m_targets.getUnitTarget()); - // remove random units from the map - std::list<Unit*>::iterator itr; - while(TagUnitMap.size() > unMaxTargets) - { - itr = TagUnitMap.begin(); - advance(itr, urand(0, TagUnitMap.size() - 1)); - TagUnitMap.erase(itr); - } + Trinity::RandomResizeList(TagUnitMap, unMaxTargets); } } |