diff options
author | megamage <none@none> | 2009-04-13 18:03:58 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-04-13 18:03:58 -0500 |
commit | c5c6b4ff1b7bac973e3be9a5e6b91f473d596558 (patch) | |
tree | e09be652eeeebd9adc0211cfae2f0f705552ceff /src | |
parent | 25f71813c5666ad5105418601b5ea89e55f4516a (diff) |
*Use function RandomResizeList to resize spell target list.
--HG--
branch : trunk
Diffstat (limited to 'src')
-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); } } |