3 local zonei
, zonec
= {}, {}
4 for ci
,c
in pairs
{GetMapContinents()} do
5 for zi
,z
in pairs
{GetMapZones(ci
)} do
6 zonei
[z
], zonec
[z
] = zi
, ci
11 local function MapPoint(zone
, x
, y
, desc
)
12 local zi
, zc
= zone
and zonei
[zone
], zone
and zonec
[zone
]
14 if zone
then TourGuide
:PrintF("Cannot find zone %q, using current zone.", zone
)
15 else TourGuide
:Print("No zone provided, using current zone.") end
17 zi
, zc
= GetCurrentMapZone(), GetCurrentMapContinent()
20 if TomTom
then TomTom
:AddZWaypoint(zc
, zi
, x
, y
, desc
) --AddZWaypoint(c,z,x,y,desc) select(z, GetMapZones(c))
21 elseif Cartographer_Waypoints
then Cartographer_Waypoints
:AddLHWaypoint(zc
, zi
, x
, y
, desc
) end -- continent, zone, x, y desc
25 function TourGuide
:ParseAndMapCoords(note
, desc
, zone
)
26 for x
,y
in note
:gmatch("%(([%d.]+),%s?([%d.]+)%)") do MapPoint(zone
, tonumber(x
), tonumber(y
), desc
) end
30 --~ TODO: function TourGuide:PurgeWaypoints(desc)