((L2MinionInstance) player).getLeader().stopHating(this);
List<L2MinionInstance> spawnedMinions = ((L2MonsterInstance) player).getSpawnedMinions();
if (spawnedMinions != null && spawnedMinions.size() > 0)
{
Iterator<L2MinionInstance> itr = spawnedMinions.iterator();
L2MinionInstance minion;
while (itr.hasNext())
{
minion = itr.next();
if (((L2Attackable) player).getMostHated() == null)
{
((L2AttackableAI) minion.getAI()).setGlobalAggro(-25);
minion.clearAggroList();
minion.getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
minion.setWalking();
}
if (minion != null && !minion.isDead())
{
((L2AttackableAI) minion.getAI()).setGlobalAggro(-25);
minion.clearAggroList();
minion.getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
minion.addDamage(((L2Attackable) player).getMostHated(), 100);
}
}
itr = null;
spawnedMinions = null;
minion = null;
}
}
else
{
((L2Attackable) player).stopHating(this);
List<L2MinionInstance> spawnedMinions = ((L2MonsterInstance) player).getSpawnedMinions();
if (spawnedMinions != null && spawnedMinions.size() > 0)
{
Iterator<L2MinionInstance> itr = spawnedMinions.iterator();
L2MinionInstance minion;
while (itr.hasNext())
{
minion = itr.next();
if (((L2Attackable) player).getMostHated() == null)
{
((L2AttackableAI) minion.getAI()).setGlobalAggro(-25);
minion.clearAggroList();
minion.getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
minion.setWalking();
}
if (minion != null && !minion.isDead())
{
((L2AttackableAI) minion.getAI()).setGlobalAggro(-25);
minion.clearAggroList();
minion.getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
minion.addDamage(((L2Attackable) player).getMostHated(), 100);
}
}
itr = null;
spawnedMinions = null;
minion = null;