Increased and merged NPC interaction distances.
This commit is contained in:
parent
dd8bfd30d1
commit
8ce7e99ab3
@ -110,9 +110,7 @@ import com.l2jmobius.gameserver.util.Broadcast;
|
|||||||
public class L2Npc extends L2Character
|
public class L2Npc extends L2Character
|
||||||
{
|
{
|
||||||
/** The interaction distance of the L2NpcInstance(is used as offset in MovetoLocation method) */
|
/** The interaction distance of the L2NpcInstance(is used as offset in MovetoLocation method) */
|
||||||
public static final int INTERACTION_DISTANCE = 150;
|
public static final int INTERACTION_DISTANCE = 250;
|
||||||
/** 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. */
|
/** Maximum distance where the drop may appear given this NPC position. */
|
||||||
public static final int RANDOM_ITEM_DROP_LIMIT = 70;
|
public static final int RANDOM_ITEM_DROP_LIMIT = 70;
|
||||||
/** The L2Spawn object that manage this L2NpcInstance */
|
/** The L2Spawn object that manage this L2NpcInstance */
|
||||||
@ -508,7 +506,7 @@ public class L2Npc extends L2Character
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if (!isInsideRadius(player, INTERACTION_DISTANCE_TALK, true, false))
|
else if (!isInsideRadius(player, INTERACTION_DISTANCE, true, false))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1494,7 +1494,7 @@ public final class L2PcInstance extends L2Playable
|
|||||||
|
|
||||||
final L2Npc target = getLastFolkNPC();
|
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);
|
quest.notifyEvent(event, target, this);
|
||||||
}
|
}
|
||||||
@ -1502,7 +1502,7 @@ public final class L2PcInstance extends L2Playable
|
|||||||
{
|
{
|
||||||
final L2Object object = L2World.getInstance().findObject(getLastQuestNpcObject());
|
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;
|
final L2Npc npc = (L2Npc) object;
|
||||||
quest.notifyEvent(event, npc, this);
|
quest.notifyEvent(event, npc, this);
|
||||||
|
@ -110,7 +110,7 @@ public final class RequestBypassToServer implements IClientIncomingPacket
|
|||||||
return;
|
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
|
// 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;
|
return;
|
||||||
@ -159,7 +159,7 @@ public final class RequestBypassToServer implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
final L2Object object = L2World.getInstance().findObject(Integer.parseInt(id));
|
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));
|
((L2Npc) object).onBypassFeedback(activeChar, _command.substring(endOfId + 1));
|
||||||
}
|
}
|
||||||
|
@ -110,9 +110,7 @@ import com.l2jmobius.gameserver.util.Broadcast;
|
|||||||
public class L2Npc extends L2Character
|
public class L2Npc extends L2Character
|
||||||
{
|
{
|
||||||
/** The interaction distance of the L2NpcInstance(is used as offset in MovetoLocation method) */
|
/** The interaction distance of the L2NpcInstance(is used as offset in MovetoLocation method) */
|
||||||
public static final int INTERACTION_DISTANCE = 150;
|
public static final int INTERACTION_DISTANCE = 250;
|
||||||
/** 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. */
|
/** Maximum distance where the drop may appear given this NPC position. */
|
||||||
public static final int RANDOM_ITEM_DROP_LIMIT = 70;
|
public static final int RANDOM_ITEM_DROP_LIMIT = 70;
|
||||||
/** The L2Spawn object that manage this L2NpcInstance */
|
/** The L2Spawn object that manage this L2NpcInstance */
|
||||||
@ -508,7 +506,7 @@ public class L2Npc extends L2Character
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if (!isInsideRadius(player, INTERACTION_DISTANCE_TALK, true, false))
|
else if (!isInsideRadius(player, INTERACTION_DISTANCE, true, false))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1494,7 +1494,7 @@ public final class L2PcInstance extends L2Playable
|
|||||||
|
|
||||||
final L2Npc target = getLastFolkNPC();
|
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);
|
quest.notifyEvent(event, target, this);
|
||||||
}
|
}
|
||||||
@ -1502,7 +1502,7 @@ public final class L2PcInstance extends L2Playable
|
|||||||
{
|
{
|
||||||
final L2Object object = L2World.getInstance().findObject(getLastQuestNpcObject());
|
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;
|
final L2Npc npc = (L2Npc) object;
|
||||||
quest.notifyEvent(event, npc, this);
|
quest.notifyEvent(event, npc, this);
|
||||||
|
@ -110,7 +110,7 @@ public final class RequestBypassToServer implements IClientIncomingPacket
|
|||||||
return;
|
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
|
// 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;
|
return;
|
||||||
@ -159,7 +159,7 @@ public final class RequestBypassToServer implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
final L2Object object = L2World.getInstance().findObject(Integer.parseInt(id));
|
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));
|
((L2Npc) object).onBypassFeedback(activeChar, _command.substring(endOfId + 1));
|
||||||
}
|
}
|
||||||
|
@ -110,9 +110,7 @@ import com.l2jmobius.gameserver.util.Broadcast;
|
|||||||
public class L2Npc extends L2Character
|
public class L2Npc extends L2Character
|
||||||
{
|
{
|
||||||
/** The interaction distance of the L2NpcInstance(is used as offset in MovetoLocation method) */
|
/** The interaction distance of the L2NpcInstance(is used as offset in MovetoLocation method) */
|
||||||
public static final int INTERACTION_DISTANCE = 150;
|
public static final int INTERACTION_DISTANCE = 250;
|
||||||
/** 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. */
|
/** Maximum distance where the drop may appear given this NPC position. */
|
||||||
public static final int RANDOM_ITEM_DROP_LIMIT = 70;
|
public static final int RANDOM_ITEM_DROP_LIMIT = 70;
|
||||||
/** The L2Spawn object that manage this L2NpcInstance */
|
/** The L2Spawn object that manage this L2NpcInstance */
|
||||||
@ -508,7 +506,7 @@ public class L2Npc extends L2Character
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if (!isInsideRadius(player, INTERACTION_DISTANCE_TALK, true, false))
|
else if (!isInsideRadius(player, INTERACTION_DISTANCE, true, false))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1496,7 +1496,7 @@ public final class L2PcInstance extends L2Playable
|
|||||||
|
|
||||||
final L2Npc target = getLastFolkNPC();
|
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);
|
quest.notifyEvent(event, target, this);
|
||||||
}
|
}
|
||||||
@ -1504,7 +1504,7 @@ public final class L2PcInstance extends L2Playable
|
|||||||
{
|
{
|
||||||
final L2Object object = L2World.getInstance().findObject(getLastQuestNpcObject());
|
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;
|
final L2Npc npc = (L2Npc) object;
|
||||||
quest.notifyEvent(event, npc, this);
|
quest.notifyEvent(event, npc, this);
|
||||||
|
@ -110,7 +110,7 @@ public final class RequestBypassToServer implements IClientIncomingPacket
|
|||||||
return;
|
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
|
// 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;
|
return;
|
||||||
@ -159,7 +159,7 @@ public final class RequestBypassToServer implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
final L2Object object = L2World.getInstance().findObject(Integer.parseInt(id));
|
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));
|
((L2Npc) object).onBypassFeedback(activeChar, _command.substring(endOfId + 1));
|
||||||
}
|
}
|
||||||
|
@ -110,9 +110,7 @@ import com.l2jmobius.gameserver.util.Broadcast;
|
|||||||
public class L2Npc extends L2Character
|
public class L2Npc extends L2Character
|
||||||
{
|
{
|
||||||
/** The interaction distance of the L2NpcInstance(is used as offset in MovetoLocation method) */
|
/** The interaction distance of the L2NpcInstance(is used as offset in MovetoLocation method) */
|
||||||
public static final int INTERACTION_DISTANCE = 150;
|
public static final int INTERACTION_DISTANCE = 250;
|
||||||
/** 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. */
|
/** Maximum distance where the drop may appear given this NPC position. */
|
||||||
public static final int RANDOM_ITEM_DROP_LIMIT = 70;
|
public static final int RANDOM_ITEM_DROP_LIMIT = 70;
|
||||||
/** The L2Spawn object that manage this L2NpcInstance */
|
/** The L2Spawn object that manage this L2NpcInstance */
|
||||||
@ -508,7 +506,7 @@ public class L2Npc extends L2Character
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if (!isInsideRadius(player, INTERACTION_DISTANCE_TALK, true, false))
|
else if (!isInsideRadius(player, INTERACTION_DISTANCE, true, false))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1507,7 +1507,7 @@ public final class L2PcInstance extends L2Playable
|
|||||||
|
|
||||||
final L2Npc target = getLastFolkNPC();
|
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);
|
quest.notifyEvent(event, target, this);
|
||||||
}
|
}
|
||||||
@ -1515,7 +1515,7 @@ public final class L2PcInstance extends L2Playable
|
|||||||
{
|
{
|
||||||
final L2Object object = L2World.getInstance().findObject(getLastQuestNpcObject());
|
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;
|
final L2Npc npc = (L2Npc) object;
|
||||||
quest.notifyEvent(event, npc, this);
|
quest.notifyEvent(event, npc, this);
|
||||||
|
@ -110,7 +110,7 @@ public final class RequestBypassToServer implements IClientIncomingPacket
|
|||||||
return;
|
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
|
// 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;
|
return;
|
||||||
@ -159,7 +159,7 @@ public final class RequestBypassToServer implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
final L2Object object = L2World.getInstance().findObject(Integer.parseInt(id));
|
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));
|
((L2Npc) object).onBypassFeedback(activeChar, _command.substring(endOfId + 1));
|
||||||
}
|
}
|
||||||
|
@ -110,9 +110,7 @@ import com.l2jmobius.gameserver.util.Broadcast;
|
|||||||
public class L2Npc extends L2Character
|
public class L2Npc extends L2Character
|
||||||
{
|
{
|
||||||
/** The interaction distance of the L2NpcInstance(is used as offset in MovetoLocation method) */
|
/** The interaction distance of the L2NpcInstance(is used as offset in MovetoLocation method) */
|
||||||
public static final int INTERACTION_DISTANCE = 150;
|
public static final int INTERACTION_DISTANCE = 250;
|
||||||
/** 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. */
|
/** Maximum distance where the drop may appear given this NPC position. */
|
||||||
public static final int RANDOM_ITEM_DROP_LIMIT = 70;
|
public static final int RANDOM_ITEM_DROP_LIMIT = 70;
|
||||||
/** The L2Spawn object that manage this L2NpcInstance */
|
/** The L2Spawn object that manage this L2NpcInstance */
|
||||||
@ -508,7 +506,7 @@ public class L2Npc extends L2Character
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if (!isInsideRadius(player, INTERACTION_DISTANCE_TALK, true, false))
|
else if (!isInsideRadius(player, INTERACTION_DISTANCE, true, false))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1471,7 +1471,7 @@ public final class L2PcInstance extends L2Playable
|
|||||||
|
|
||||||
final L2Npc target = getLastFolkNPC();
|
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);
|
quest.notifyEvent(event, target, this);
|
||||||
}
|
}
|
||||||
@ -1479,7 +1479,7 @@ public final class L2PcInstance extends L2Playable
|
|||||||
{
|
{
|
||||||
final L2Object object = L2World.getInstance().findObject(getLastQuestNpcObject());
|
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;
|
final L2Npc npc = (L2Npc) object;
|
||||||
quest.notifyEvent(event, npc, this);
|
quest.notifyEvent(event, npc, this);
|
||||||
|
@ -110,7 +110,7 @@ public final class RequestBypassToServer implements IClientIncomingPacket
|
|||||||
return;
|
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
|
// 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;
|
return;
|
||||||
@ -159,7 +159,7 @@ public final class RequestBypassToServer implements IClientIncomingPacket
|
|||||||
{
|
{
|
||||||
final L2Object object = L2World.getInstance().findObject(Integer.parseInt(id));
|
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));
|
((L2Npc) object).onBypassFeedback(activeChar, _command.substring(endOfId + 1));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user