Stored npc talk interaction distance to a static variable.

This commit is contained in:
MobiusDev
2016-07-24 13:23:27 +00:00
parent f2a055aedc
commit ee5c640077
2 changed files with 5 additions and 3 deletions

View File

@@ -105,6 +105,8 @@ public class L2Npc extends L2Character
{
/** The interaction distance of the L2NpcInstance(is used as offset in MovetoLocation method) */
public static final int INTERACTION_DISTANCE = 150;
/** The talking interaction distance of the L2NpcInstance */
public static final int INTERACTION_DISTANCE_TALK = 200;
/** Maximum distance where the drop may appear given this NPC position. */
public static final int RANDOM_ITEM_DROP_LIMIT = 70;
/** The L2Spawn object that manage this L2NpcInstance */
@@ -493,7 +495,7 @@ public class L2Npc extends L2Character
{
return false;
}
else if (!isInsideRadius(player, (int) (INTERACTION_DISTANCE * 1.7), true, false))
else if (!isInsideRadius(player, INTERACTION_DISTANCE_TALK, true, false))
{
return false;
}