*Some cleanup of Kalecgos script.

--HG--
branch : trunk
This commit is contained in:
megamage committed 2009-08-21 23:38:04 -05:00
1 parent 0ee9bffd5a
commit 189d9fdd51
2 files changed
+90 -90

No files matched your search

+10 -1
View File
@@ -165,7 +165,16 @@ Unit* UnitAI::SelectTarget(SelectAggroTarget targetType, uint32 position, float
if(targetType == SELECT_TARGET_TOPAGGRO)
advance(i, position);
else // random
advance(i, position + rand()%(m_threatlist.size() - position));
{
//advance(i, position + rand()%(m_threatlist.size() - position));
//if we use "random, 1", usually we want random except current victim
advance(i, rand()%m_threatlist.size());
if(position && (*i)->getTarget() == me->getVictim())
{
m_threatlist.erase(i);
continue;
}
}
}
if(SelectTargetHelper(me, (*i)->getTarget(), playerOnly, dist, aura))