From 97b3e345a8787a44c9b9c03927b162f726abcce2 Mon Sep 17 00:00:00 2001 From: bash Date: Sun, 31 May 2026 17:12:45 +0200 Subject: [PATCH] =?UTF-8?q?fix(Core/Debug):=20Inline=20zone=20filter=20in?= =?UTF-8?q?=20showpath=20cmd=20=E2=80=94=20GetNodesInZone=20was=20removed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Script/PlayerbotCommandScript.cpp | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/Script/PlayerbotCommandScript.cpp b/src/Script/PlayerbotCommandScript.cpp index 38f59bad9..4b22af607 100644 --- a/src/Script/PlayerbotCommandScript.cpp +++ b/src/Script/PlayerbotCommandScript.cpp @@ -16,6 +16,7 @@ #include "BattleGroundTactics.h" #include "Chat.h" #include "GuildTaskMgr.h" +#include "MapMgr.h" #include "PerfMonitor.h" #include "PlayerbotMgr.h" #include "RandomPlayerbotMgr.h" @@ -186,7 +187,24 @@ public: } uint32 zoneId = player->GetZoneId(); - std::vector const& nodes = sTravelNodeMap.GetNodesInZone(zoneId); + uint32 const phaseMask = player->GetPhaseMask(); + uint32 const mapId = player->GetMapId(); + std::vector nodes; + for (TravelNode* n : sTravelNodeMap.getNodes()) + { + if (!n) + continue; + WorldPosition* pos = n->getPosition(); + if (!pos || pos->GetMapId() != mapId) + continue; + uint32 const nodeZone = sMapMgr->GetZoneId(phaseMask, mapId, + pos->GetPositionX(), + pos->GetPositionY(), + pos->GetPositionZ()); + if (nodeZone != zoneId) + continue; + nodes.push_back(n); + } if (nodes.empty()) { handler->PSendSysMessage("No travel nodes registered in zone {} (is the travel node system loaded?)", zoneId);