aboutsummaryrefslogtreecommitdiff
path: root/src/game/Spell.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Spell.cpp')
-rw-r--r--src/game/Spell.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index d9aa5ffc2a1..ec07bde8f72 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -2046,14 +2046,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);
/*if(m_spellInfo->Id==57669) //Replenishment (special target selection)
{