ignoreClanNpcIds = npc.getTemplate().getIgnoreClanNpcIds();
final String clansString = !clans.isEmpty() ? CommonUtil.implode(clans, ", ") : "";
final String ignoreClanNpcIdsString = ignoreClanNpcIds != null ? CommonUtil.implode(ignoreClanNpcIds, ", ") : "";
html.replace("%ai_intention%", "Intention: | " + String.valueOf(npc.getAI().getIntention().name()) + " |
|
");
html.replace("%ai%", "AI | " + npc.getAI().getClass().getSimpleName() + " |
|
");
html.replace("%ai_type%", "AIType | " + String.valueOf(npc.getAiType()) + " |
|
");
html.replace("%ai_clan%", "Clan & Range: | " + clansString + " " + String.valueOf(npc.getTemplate().getClanHelpRange()) + " |
|
");
html.replace("%ai_enemy_clan%", "Ignore & Range: | " + ignoreClanNpcIdsString + " " + String.valueOf(npc.getTemplate().getAggroRange()) + " |
|
");
}
else
{
html.replace("%ai_intention%", "");
html.replace("%ai%", "");
html.replace("%ai_type%", "");
html.replace("%ai_clan%", "");
html.replace("%ai_enemy_clan%", "");
}
final String routeName = WalkingManager.getInstance().getRouteName(npc);
if (!routeName.isEmpty())
{
html.replace("%route%", " |
");
}
else
{
html.replace("%route%", "");
}
activeChar.sendPacket(html);
}
else if (Config.ALT_GAME_VIEWNPC)
{
if (!target.isNpc())
{
return false;
}
activeChar.setTarget(target);
NpcViewMod.sendNpcView(activeChar, (L2Npc) target);
}
return true;
}
@Override
public InstanceType getInstanceType()
{
return InstanceType.L2Npc;
}
}