Hi guys, i'm working on a feature to spawn back to original spawn a raid boss if calculateDistance2D is > than a fixed configuration option i created:
FixedDistanceRaidRange = 1500
This is the logic in AttackableAI.java on thinkAttack method:
if ((spawn != null) && npc.isRaid())
{
if ((Config.FIXED_DISTANCE_CHECK_RAID_RANGE > 0) && (npc.calculateDistance2D(spawn.getSpawnLocation()) > Config.FIXED_DISTANCE_CHECK_RAID_RANGE))
{
npc.abortAttack();
npc.clearAggroList();
npc.getAttackByList().clear();
setIntention(AI_INTENTION_ACTIVE);
npc.teleToLocation(spawn.getLocation(), false);
return;
}
}
However when npc.teleToLocation is executed, if i go back to hit the raid boss, minions do not attack me, they just stand still.
I was wondering if someone could give me a hint on how to manage this, tried this:
if (_actor.asMonster().hasMinions())
{
for (Monster minion : _actor.asMonster().getMinionList().getSpawnedMinions())
{
minion.abortAttack();
minion.clearAggroList();
minion.getAttackByList().clear();
minion.teleToLocation(spawn.getLocation(), true);
}
}
but it ain't working. Could this be related to the instanceId of the raid boss?