From 5e7788c4f701728eac3182e5add66ba9b84fc195 Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Mon, 3 Sep 2018 15:57:54 +0000 Subject: [PATCH] Correct walker location instead of stop route. --- .../l2jmobius/gameserver/instancemanager/WalkingManager.java | 5 ++--- .../l2jmobius/gameserver/instancemanager/WalkingManager.java | 5 ++--- .../l2jmobius/gameserver/instancemanager/WalkingManager.java | 5 ++--- .../l2jmobius/gameserver/instancemanager/WalkingManager.java | 5 ++--- .../l2jmobius/gameserver/instancemanager/WalkingManager.java | 5 ++--- .../l2jmobius/gameserver/instancemanager/WalkingManager.java | 5 ++--- .../l2jmobius/gameserver/instancemanager/WalkingManager.java | 5 ++--- .../l2jmobius/gameserver/instancemanager/WalkingManager.java | 5 ++--- 8 files changed, 16 insertions(+), 24 deletions(-) diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/instancemanager/WalkingManager.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/instancemanager/WalkingManager.java index 396a533f78..0536f30e78 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/instancemanager/WalkingManager.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/instancemanager/WalkingManager.java @@ -285,9 +285,8 @@ public final class WalkingManager implements IGameXmlReader if (!npc.isInsideRadius(node, 3000, true, false)) { - final String message = "Route '" + routeName + "': NPC (id=" + npc.getId() + ", x=" + npc.getX() + ", y=" + npc.getY() + ", z=" + npc.getZ() + ") is too far from starting point (node x=" + node.getX() + ", y=" + node.getY() + ", z=" + node.getZ() + ", range=" + npc.calculateDistance(node, true, true) + "), walking will not start"; - LOGGER.warning(message); - return; + LOGGER.warning("Route '" + routeName + "': NPC (id=" + npc.getId() + ", x=" + npc.getX() + ", y=" + npc.getY() + ", z=" + npc.getZ() + ") is too far from starting point (node x=" + node.getX() + ", y=" + node.getY() + ", z=" + node.getZ() + ", range=" + npc.calculateDistance(node, true, true) + "). Teleporting to proper location."); + npc.teleToLocation(node); } if (node.runToLocation()) diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/instancemanager/WalkingManager.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/instancemanager/WalkingManager.java index 396a533f78..0536f30e78 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/instancemanager/WalkingManager.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/instancemanager/WalkingManager.java @@ -285,9 +285,8 @@ public final class WalkingManager implements IGameXmlReader if (!npc.isInsideRadius(node, 3000, true, false)) { - final String message = "Route '" + routeName + "': NPC (id=" + npc.getId() + ", x=" + npc.getX() + ", y=" + npc.getY() + ", z=" + npc.getZ() + ") is too far from starting point (node x=" + node.getX() + ", y=" + node.getY() + ", z=" + node.getZ() + ", range=" + npc.calculateDistance(node, true, true) + "), walking will not start"; - LOGGER.warning(message); - return; + LOGGER.warning("Route '" + routeName + "': NPC (id=" + npc.getId() + ", x=" + npc.getX() + ", y=" + npc.getY() + ", z=" + npc.getZ() + ") is too far from starting point (node x=" + node.getX() + ", y=" + node.getY() + ", z=" + node.getZ() + ", range=" + npc.calculateDistance(node, true, true) + "). Teleporting to proper location."); + npc.teleToLocation(node); } if (node.runToLocation()) diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/instancemanager/WalkingManager.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/instancemanager/WalkingManager.java index 396a533f78..0536f30e78 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/instancemanager/WalkingManager.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/instancemanager/WalkingManager.java @@ -285,9 +285,8 @@ public final class WalkingManager implements IGameXmlReader if (!npc.isInsideRadius(node, 3000, true, false)) { - final String message = "Route '" + routeName + "': NPC (id=" + npc.getId() + ", x=" + npc.getX() + ", y=" + npc.getY() + ", z=" + npc.getZ() + ") is too far from starting point (node x=" + node.getX() + ", y=" + node.getY() + ", z=" + node.getZ() + ", range=" + npc.calculateDistance(node, true, true) + "), walking will not start"; - LOGGER.warning(message); - return; + LOGGER.warning("Route '" + routeName + "': NPC (id=" + npc.getId() + ", x=" + npc.getX() + ", y=" + npc.getY() + ", z=" + npc.getZ() + ") is too far from starting point (node x=" + node.getX() + ", y=" + node.getY() + ", z=" + node.getZ() + ", range=" + npc.calculateDistance(node, true, true) + "). Teleporting to proper location."); + npc.teleToLocation(node); } if (node.runToLocation()) diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/instancemanager/WalkingManager.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/instancemanager/WalkingManager.java index 396a533f78..0536f30e78 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/instancemanager/WalkingManager.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/instancemanager/WalkingManager.java @@ -285,9 +285,8 @@ public final class WalkingManager implements IGameXmlReader if (!npc.isInsideRadius(node, 3000, true, false)) { - final String message = "Route '" + routeName + "': NPC (id=" + npc.getId() + ", x=" + npc.getX() + ", y=" + npc.getY() + ", z=" + npc.getZ() + ") is too far from starting point (node x=" + node.getX() + ", y=" + node.getY() + ", z=" + node.getZ() + ", range=" + npc.calculateDistance(node, true, true) + "), walking will not start"; - LOGGER.warning(message); - return; + LOGGER.warning("Route '" + routeName + "': NPC (id=" + npc.getId() + ", x=" + npc.getX() + ", y=" + npc.getY() + ", z=" + npc.getZ() + ") is too far from starting point (node x=" + node.getX() + ", y=" + node.getY() + ", z=" + node.getZ() + ", range=" + npc.calculateDistance(node, true, true) + "). Teleporting to proper location."); + npc.teleToLocation(node); } if (node.runToLocation()) diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/instancemanager/WalkingManager.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/instancemanager/WalkingManager.java index eea7e14016..8a96e716b7 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/instancemanager/WalkingManager.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/instancemanager/WalkingManager.java @@ -256,9 +256,8 @@ public final class WalkingManager implements IGameXmlReader if (!npc.isInsideRadius(node, 3000, true, false)) { - final String message = "Route '" + routeName + "': NPC (id=" + npc.getId() + ", x=" + npc.getX() + ", y=" + npc.getY() + ", z=" + npc.getZ() + ") is too far from starting point (node x=" + node.getX() + ", y=" + node.getY() + ", z=" + node.getZ() + ", range=" + npc.calculateDistance(node, true, true) + "), walking will not start"; - LOGGER.warning(getClass().getSimpleName() + ": " + message); - return; + LOGGER.warning(getClass().getSimpleName() + ": " + "Route '" + routeName + "': NPC (id=" + npc.getId() + ", x=" + npc.getX() + ", y=" + npc.getY() + ", z=" + npc.getZ() + ") is too far from starting point (node x=" + node.getX() + ", y=" + node.getY() + ", z=" + node.getZ() + ", range=" + npc.calculateDistance(node, true, true) + "). Teleporting to proper location."); + npc.teleToLocation(node); } if (node.runToLocation()) diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/instancemanager/WalkingManager.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/instancemanager/WalkingManager.java index 78d2b76d54..549e41e207 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/instancemanager/WalkingManager.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/instancemanager/WalkingManager.java @@ -283,9 +283,8 @@ public final class WalkingManager implements IGameXmlReader if (!npc.isInsideRadius(node, 3000, true, false)) { - final String message = "Route '" + routeName + "': NPC (id=" + npc.getId() + ", x=" + npc.getX() + ", y=" + npc.getY() + ", z=" + npc.getZ() + ") is too far from starting point (node x=" + node.getX() + ", y=" + node.getY() + ", z=" + node.getZ() + ", range=" + npc.calculateDistance(node, true, true) + "), walking will not start"; - LOGGER.warning(message); - return; + LOGGER.warning("Route '" + routeName + "': NPC (id=" + npc.getId() + ", x=" + npc.getX() + ", y=" + npc.getY() + ", z=" + npc.getZ() + ") is too far from starting point (node x=" + node.getX() + ", y=" + node.getY() + ", z=" + node.getZ() + ", range=" + npc.calculateDistance(node, true, true) + "). Teleporting to proper location."); + npc.teleToLocation(node); } if (node.runToLocation()) diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/instancemanager/WalkingManager.java b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/instancemanager/WalkingManager.java index 78d2b76d54..549e41e207 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/instancemanager/WalkingManager.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/com/l2jmobius/gameserver/instancemanager/WalkingManager.java @@ -283,9 +283,8 @@ public final class WalkingManager implements IGameXmlReader if (!npc.isInsideRadius(node, 3000, true, false)) { - final String message = "Route '" + routeName + "': NPC (id=" + npc.getId() + ", x=" + npc.getX() + ", y=" + npc.getY() + ", z=" + npc.getZ() + ") is too far from starting point (node x=" + node.getX() + ", y=" + node.getY() + ", z=" + node.getZ() + ", range=" + npc.calculateDistance(node, true, true) + "), walking will not start"; - LOGGER.warning(message); - return; + LOGGER.warning("Route '" + routeName + "': NPC (id=" + npc.getId() + ", x=" + npc.getX() + ", y=" + npc.getY() + ", z=" + npc.getZ() + ") is too far from starting point (node x=" + node.getX() + ", y=" + node.getY() + ", z=" + node.getZ() + ", range=" + npc.calculateDistance(node, true, true) + "). Teleporting to proper location."); + npc.teleToLocation(node); } if (node.runToLocation()) diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/instancemanager/WalkingManager.java b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/instancemanager/WalkingManager.java index 78d2b76d54..549e41e207 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/instancemanager/WalkingManager.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/com/l2jmobius/gameserver/instancemanager/WalkingManager.java @@ -283,9 +283,8 @@ public final class WalkingManager implements IGameXmlReader if (!npc.isInsideRadius(node, 3000, true, false)) { - final String message = "Route '" + routeName + "': NPC (id=" + npc.getId() + ", x=" + npc.getX() + ", y=" + npc.getY() + ", z=" + npc.getZ() + ") is too far from starting point (node x=" + node.getX() + ", y=" + node.getY() + ", z=" + node.getZ() + ", range=" + npc.calculateDistance(node, true, true) + "), walking will not start"; - LOGGER.warning(message); - return; + LOGGER.warning("Route '" + routeName + "': NPC (id=" + npc.getId() + ", x=" + npc.getX() + ", y=" + npc.getY() + ", z=" + npc.getZ() + ") is too far from starting point (node x=" + node.getX() + ", y=" + node.getY() + ", z=" + node.getZ() + ", range=" + npc.calculateDistance(node, true, true) + "). Teleporting to proper location."); + npc.teleToLocation(node); } if (node.runToLocation())