Skip to content

Commit

Permalink
Merge pull request #246 from codegain/wowhead_waypoints
Browse files Browse the repository at this point in the history
support wowhead (TomTom) waypoints
  • Loading branch information
IrcDirk authored Jun 29, 2023
2 parents cd7e0b8 + 6426988 commit 13af964
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions NxMap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10365,7 +10365,7 @@ function Nx.Map:ParseTargetStr (str)

local mid = Nx.Map.UpdateMapID

if zone then
if zone then
mid = nil
local cont = 0
local curmid = Nx.Map:GetCurrentMapAreaID()
Expand All @@ -10379,15 +10379,19 @@ function Nx.Map:ParseTargetStr (str)
end

for id, zonedesc in pairs (Nx.Zones) do
local name = strlower (string.gsub (zonedesc, "|.*", ""))
if name == zone or string.sub (name, 1, #zone) == zone then
if (cont > 0) and Nx.Map.MapWorldInfo[id].Cont == cont then
mid = id
elseif (cont == 0) then
if not mid or math.abs(mid - curmid) > math.abs(mid - id) then
if "#" .. id == zone then
mid = id
else
local name = strlower (string.gsub (zonedesc, "|.*", ""))
if name == zone or string.sub (name, 1, #zone) == zone then
if (cont > 0) and Nx.Map.MapWorldInfo[id].Cont == cont then
mid = id
end
end
elseif (cont == 0) then
if not mid or math.abs(mid - curmid) > math.abs(mid - id) then
mid = id
end
end
end
end
end

Expand Down

0 comments on commit 13af964

Please sign in to comment.