Increased and merged NPC interaction distances.

This commit is contained in:
MobiusDev 2018-01-29 16:44:25 +00:00
parent dd8bfd30d1
commit 8ce7e99ab3
15 changed files with 30 additions and 40 deletions

View File

@ -110,9 +110,7 @@ import com.l2jmobius.gameserver.util.Broadcast;
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;
public static final int INTERACTION_DISTANCE = 250;
/** 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 */
@ -508,7 +506,7 @@ public class L2Npc extends L2Character
{
return false;
}
else if (!isInsideRadius(player, INTERACTION_DISTANCE_TALK, true, false))
else if (!isInsideRadius(player, INTERACTION_DISTANCE, true, false))
{
return false;
}

View File

@ -1494,7 +1494,7 @@ public final class L2PcInstance extends L2Playable
final L2Npc target = getLastFolkNPC();
if ((target != null) && isInsideRadius(target, L2Npc.INTERACTION_DISTANCE_TALK, false, false))
if ((target != null) && isInsideRadius(target, L2Npc.INTERACTION_DISTANCE, false, false))
{
quest.notifyEvent(event, target, this);
}
@ -1502,7 +1502,7 @@ public final class L2PcInstance extends L2Playable
{
final L2Object object = L2World.getInstance().findObject(getLastQuestNpcObject());
if (object.isNpc() && isInsideRadius(object, L2Npc.INTERACTION_DISTANCE_TALK, false, false))
if (object.isNpc() && isInsideRadius(object, L2Npc.INTERACTION_DISTANCE, false, false))
{
final L2Npc npc = (L2Npc) object;
quest.notifyEvent(event, npc, this);

View File

@ -110,7 +110,7 @@ public final class RequestBypassToServer implements IClientIncomingPacket
return;
}
if ((bypassOriginId > 0) && !Util.isInsideRangeOfObjectId(activeChar, bypassOriginId, L2Npc.INTERACTION_DISTANCE_TALK))
if ((bypassOriginId > 0) && !Util.isInsideRangeOfObjectId(activeChar, bypassOriginId, L2Npc.INTERACTION_DISTANCE))
{
// No logging here, this could be a common case where the player has the html still open and run too far away and then clicks a html action
return;
@ -159,7 +159,7 @@ public final class RequestBypassToServer implements IClientIncomingPacket
{
final L2Object object = L2World.getInstance().findObject(Integer.parseInt(id));
if ((object != null) && object.isNpc() && (endOfId > 0) && activeChar.isInsideRadius(object, L2Npc.INTERACTION_DISTANCE_TALK, false, false))
if ((object != null) && object.isNpc() && (endOfId > 0) && activeChar.isInsideRadius(object, L2Npc.INTERACTION_DISTANCE, false, false))
{
((L2Npc) object).onBypassFeedback(activeChar, _command.substring(endOfId + 1));
}

View File

@ -110,9 +110,7 @@ import com.l2jmobius.gameserver.util.Broadcast;
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;
public static final int INTERACTION_DISTANCE = 250;
/** 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 */
@ -508,7 +506,7 @@ public class L2Npc extends L2Character
{
return false;
}
else if (!isInsideRadius(player, INTERACTION_DISTANCE_TALK, true, false))
else if (!isInsideRadius(player, INTERACTION_DISTANCE, true, false))
{
return false;
}

View File

@ -1494,7 +1494,7 @@ public final class L2PcInstance extends L2Playable
final L2Npc target = getLastFolkNPC();
if ((target != null) && isInsideRadius(target, L2Npc.INTERACTION_DISTANCE_TALK, false, false))
if ((target != null) && isInsideRadius(target, L2Npc.INTERACTION_DISTANCE, false, false))
{
quest.notifyEvent(event, target, this);
}
@ -1502,7 +1502,7 @@ public final class L2PcInstance extends L2Playable
{
final L2Object object = L2World.getInstance().findObject(getLastQuestNpcObject());
if (object.isNpc() && isInsideRadius(object, L2Npc.INTERACTION_DISTANCE_TALK, false, false))
if (object.isNpc() && isInsideRadius(object, L2Npc.INTERACTION_DISTANCE, false, false))
{
final L2Npc npc = (L2Npc) object;
quest.notifyEvent(event, npc, this);

View File

@ -110,7 +110,7 @@ public final class RequestBypassToServer implements IClientIncomingPacket
return;
}
if ((bypassOriginId > 0) && !Util.isInsideRangeOfObjectId(activeChar, bypassOriginId, L2Npc.INTERACTION_DISTANCE_TALK))
if ((bypassOriginId > 0) && !Util.isInsideRangeOfObjectId(activeChar, bypassOriginId, L2Npc.INTERACTION_DISTANCE))
{
// No logging here, this could be a common case where the player has the html still open and run too far away and then clicks a html action
return;
@ -159,7 +159,7 @@ public final class RequestBypassToServer implements IClientIncomingPacket
{
final L2Object object = L2World.getInstance().findObject(Integer.parseInt(id));
if ((object != null) && object.isNpc() && (endOfId > 0) && activeChar.isInsideRadius(object, L2Npc.INTERACTION_DISTANCE_TALK, false, false))
if ((object != null) && object.isNpc() && (endOfId > 0) && activeChar.isInsideRadius(object, L2Npc.INTERACTION_DISTANCE, false, false))
{
((L2Npc) object).onBypassFeedback(activeChar, _command.substring(endOfId + 1));
}

View File

@ -110,9 +110,7 @@ import com.l2jmobius.gameserver.util.Broadcast;
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;
public static final int INTERACTION_DISTANCE = 250;
/** 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 */
@ -508,7 +506,7 @@ public class L2Npc extends L2Character
{
return false;
}
else if (!isInsideRadius(player, INTERACTION_DISTANCE_TALK, true, false))
else if (!isInsideRadius(player, INTERACTION_DISTANCE, true, false))
{
return false;
}

View File

@ -1496,7 +1496,7 @@ public final class L2PcInstance extends L2Playable
final L2Npc target = getLastFolkNPC();
if ((target != null) && isInsideRadius(target, L2Npc.INTERACTION_DISTANCE_TALK, false, false))
if ((target != null) && isInsideRadius(target, L2Npc.INTERACTION_DISTANCE, false, false))
{
quest.notifyEvent(event, target, this);
}
@ -1504,7 +1504,7 @@ public final class L2PcInstance extends L2Playable
{
final L2Object object = L2World.getInstance().findObject(getLastQuestNpcObject());
if (object.isNpc() && isInsideRadius(object, L2Npc.INTERACTION_DISTANCE_TALK, false, false))
if (object.isNpc() && isInsideRadius(object, L2Npc.INTERACTION_DISTANCE, false, false))
{
final L2Npc npc = (L2Npc) object;
quest.notifyEvent(event, npc, this);

View File

@ -110,7 +110,7 @@ public final class RequestBypassToServer implements IClientIncomingPacket
return;
}
if ((bypassOriginId > 0) && !Util.isInsideRangeOfObjectId(activeChar, bypassOriginId, L2Npc.INTERACTION_DISTANCE_TALK))
if ((bypassOriginId > 0) && !Util.isInsideRangeOfObjectId(activeChar, bypassOriginId, L2Npc.INTERACTION_DISTANCE))
{
// No logging here, this could be a common case where the player has the html still open and run too far away and then clicks a html action
return;
@ -159,7 +159,7 @@ public final class RequestBypassToServer implements IClientIncomingPacket
{
final L2Object object = L2World.getInstance().findObject(Integer.parseInt(id));
if ((object != null) && object.isNpc() && (endOfId > 0) && activeChar.isInsideRadius(object, L2Npc.INTERACTION_DISTANCE_TALK, false, false))
if ((object != null) && object.isNpc() && (endOfId > 0) && activeChar.isInsideRadius(object, L2Npc.INTERACTION_DISTANCE, false, false))
{
((L2Npc) object).onBypassFeedback(activeChar, _command.substring(endOfId + 1));
}

View File

@ -110,9 +110,7 @@ import com.l2jmobius.gameserver.util.Broadcast;
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;
public static final int INTERACTION_DISTANCE = 250;
/** 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 */
@ -508,7 +506,7 @@ public class L2Npc extends L2Character
{
return false;
}
else if (!isInsideRadius(player, INTERACTION_DISTANCE_TALK, true, false))
else if (!isInsideRadius(player, INTERACTION_DISTANCE, true, false))
{
return false;
}

View File

@ -1507,7 +1507,7 @@ public final class L2PcInstance extends L2Playable
final L2Npc target = getLastFolkNPC();
if ((target != null) && isInsideRadius(target, L2Npc.INTERACTION_DISTANCE_TALK, false, false))
if ((target != null) && isInsideRadius(target, L2Npc.INTERACTION_DISTANCE, false, false))
{
quest.notifyEvent(event, target, this);
}
@ -1515,7 +1515,7 @@ public final class L2PcInstance extends L2Playable
{
final L2Object object = L2World.getInstance().findObject(getLastQuestNpcObject());
if (object.isNpc() && isInsideRadius(object, L2Npc.INTERACTION_DISTANCE_TALK, false, false))
if (object.isNpc() && isInsideRadius(object, L2Npc.INTERACTION_DISTANCE, false, false))
{
final L2Npc npc = (L2Npc) object;
quest.notifyEvent(event, npc, this);

View File

@ -110,7 +110,7 @@ public final class RequestBypassToServer implements IClientIncomingPacket
return;
}
if ((bypassOriginId > 0) && !Util.isInsideRangeOfObjectId(activeChar, bypassOriginId, L2Npc.INTERACTION_DISTANCE_TALK))
if ((bypassOriginId > 0) && !Util.isInsideRangeOfObjectId(activeChar, bypassOriginId, L2Npc.INTERACTION_DISTANCE))
{
// No logging here, this could be a common case where the player has the html still open and run too far away and then clicks a html action
return;
@ -159,7 +159,7 @@ public final class RequestBypassToServer implements IClientIncomingPacket
{
final L2Object object = L2World.getInstance().findObject(Integer.parseInt(id));
if ((object != null) && object.isNpc() && (endOfId > 0) && activeChar.isInsideRadius(object, L2Npc.INTERACTION_DISTANCE_TALK, false, false))
if ((object != null) && object.isNpc() && (endOfId > 0) && activeChar.isInsideRadius(object, L2Npc.INTERACTION_DISTANCE, false, false))
{
((L2Npc) object).onBypassFeedback(activeChar, _command.substring(endOfId + 1));
}

View File

@ -110,9 +110,7 @@ import com.l2jmobius.gameserver.util.Broadcast;
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;
public static final int INTERACTION_DISTANCE = 250;
/** 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 */
@ -508,7 +506,7 @@ public class L2Npc extends L2Character
{
return false;
}
else if (!isInsideRadius(player, INTERACTION_DISTANCE_TALK, true, false))
else if (!isInsideRadius(player, INTERACTION_DISTANCE, true, false))
{
return false;
}

View File

@ -1471,7 +1471,7 @@ public final class L2PcInstance extends L2Playable
final L2Npc target = getLastFolkNPC();
if ((target != null) && isInsideRadius(target, L2Npc.INTERACTION_DISTANCE_TALK, false, false))
if ((target != null) && isInsideRadius(target, L2Npc.INTERACTION_DISTANCE, false, false))
{
quest.notifyEvent(event, target, this);
}
@ -1479,7 +1479,7 @@ public final class L2PcInstance extends L2Playable
{
final L2Object object = L2World.getInstance().findObject(getLastQuestNpcObject());
if (object.isNpc() && isInsideRadius(object, L2Npc.INTERACTION_DISTANCE_TALK, false, false))
if (object.isNpc() && isInsideRadius(object, L2Npc.INTERACTION_DISTANCE, false, false))
{
final L2Npc npc = (L2Npc) object;
quest.notifyEvent(event, npc, this);

View File

@ -110,7 +110,7 @@ public final class RequestBypassToServer implements IClientIncomingPacket
return;
}
if ((bypassOriginId > 0) && !Util.isInsideRangeOfObjectId(activeChar, bypassOriginId, L2Npc.INTERACTION_DISTANCE_TALK))
if ((bypassOriginId > 0) && !Util.isInsideRangeOfObjectId(activeChar, bypassOriginId, L2Npc.INTERACTION_DISTANCE))
{
// No logging here, this could be a common case where the player has the html still open and run too far away and then clicks a html action
return;
@ -159,7 +159,7 @@ public final class RequestBypassToServer implements IClientIncomingPacket
{
final L2Object object = L2World.getInstance().findObject(Integer.parseInt(id));
if ((object != null) && object.isNpc() && (endOfId > 0) && activeChar.isInsideRadius(object, L2Npc.INTERACTION_DISTANCE_TALK, false, false))
if ((object != null) && object.isNpc() && (endOfId > 0) && activeChar.isInsideRadius(object, L2Npc.INTERACTION_DISTANCE, false, false))
{
((L2Npc) object).onBypassFeedback(activeChar, _command.substring(endOfId + 1));
}