/** * Constructs new <tt>SM_NPC_INFO </tt> packet * * @param npc visible npc. * @param player */ public SM_NPC_INFO(Npc npc, Player player) { this.npc = npc; npcTemplate = npc.getObjectTemplate(); if (npcTemplate.getNpcType() == NpcType.NEUTRAL || npcTemplate.getNpcType() == NpcType.ARTIFACT) { if (player.isAggroIconTo(npc.getTribe())) npcTypeId = NpcType.NEUTRAL.getId(); else npcTypeId = NpcType.NON_ATTACKABLE.getId(); } else { npcTypeId = (player.isAggroIconTo(npc.getTribe()) ? NpcType.AGGRESSIVE.getId() : npcTemplate.getNpcType().getId()); } npcId = npc.getNpcId(); }