Code improvements.

This commit is contained in:
MobiusDev
2016-04-24 16:30:15 +00:00
parent 8bd51aba1c
commit 2dd14bef9b
860 changed files with 8865 additions and 17041 deletions

View File

@@ -50,14 +50,11 @@ public class L2ArtefactInstanceAction implements IActionHandler
{
activeChar.setTarget(target);
}
else if (interact)
// Calculate the distance between the L2PcInstance and the L2NpcInstance
else if (interact && !((L2Npc) target).canInteract(activeChar))
{
// Calculate the distance between the L2PcInstance and the L2NpcInstance
if (!((L2Npc) target).canInteract(activeChar))
{
// Notify the L2PcInstance AI with AI_INTENTION_INTERACT
activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT, target);
}
// Notify the L2PcInstance AI with AI_INTENTION_INTERACT
activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT, target);
}
return true;
}