*Some cleanup of Kalecgos script.
--HG-- branch : trunk
This commit is contained in:
1 parent
0ee9bffd5a
commit
189d9fdd51
2 files changed
+90
-90
No files matched your search
+10
-1
@@ -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))
|
||||
|
||||
Reference in new issue
Block a user