From 7bdcdebd3a8538ae7eb616444afeab8d4ea9888e Mon Sep 17 00:00:00 2001 From: Rasmus Karlsson Date: Sat, 16 Nov 2024 18:42:55 +0100 Subject: [PATCH] Undo change to the shortestPath logic --- .../com/questhelper/steps/DetailedQuestStep.java | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/questhelper/steps/DetailedQuestStep.java b/src/main/java/com/questhelper/steps/DetailedQuestStep.java index 1a7a438efd..d0eb1796d4 100644 --- a/src/main/java/com/questhelper/steps/DetailedQuestStep.java +++ b/src/main/java/com/questhelper/steps/DetailedQuestStep.java @@ -910,16 +910,13 @@ public void setShortestPath() { if (worldPoint != null) { - if (getQuestHelper().getConfig().useShortestPath()) + WorldPoint playerWp = client.getLocalPlayer().getWorldLocation(); + if (getQuestHelper().getConfig().useShortestPath() && playerWp != null) { - WorldPoint playerWp = client.getLocalPlayer().getWorldLocation(); - if (getQuestHelper().getConfig().useShortestPath() && playerWp != null) - { - Map data = new HashMap<>(); - data.put("start", playerWp); - data.put("target", worldPoint); - eventBus.post(new PluginMessage("shortestpath", "path", data)); - } + Map data = new HashMap<>(); + data.put("start", playerWp); + data.put("target", worldPoint); + eventBus.post(new PluginMessage("shortestpath", "path", data)); } } }