Ship Routes: zone maps show only their own docks' lanes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rope 2026-11-11 19:45:24 +00:00
parent db73c215bb
commit e2f18f5fd6
2 changed files with 16 additions and 3 deletions

View file

@ -394,6 +394,8 @@ function provider:RefreshAllData()
return
end
local info = C_Map.GetMapInfo(mapID)
local zoneMap = info and info.mapType and info.mapType >= Enum.UIMapType.Zone
local exits = {}
for _, route in ipairs(ns.routes) do
if Visible(route) then
@ -418,12 +420,15 @@ function provider:RefreshAllData()
if leg.smooth then
pts = Smooth(pts)
end
self.drawn[#self.drawn + 1] = { route = route, pts = pts }
-- a leg with one end on this map gets a marker where it leaves
local n = #pts
local startIn = Inside(pts[1] / W, pts[2] / H)
local endIn = Inside(pts[n - 1] / W, pts[n] / H)
-- a zone map only shows legs that sail from one of its own docks
if not zoneMap or startIn or endIn then
self.drawn[#self.drawn + 1] = { route = route, pts = pts }
end
-- a leg with one end on this map gets a marker where it leaves
if startIn ~= endIn then
local walk, far = pts, leg.to
if endIn then