2 local L
= TourGuide
.Locale
4 local zonei
, zonec
= {}, {}
5 for ci
,c
in pairs
{GetMapContinents()} do
6 for zi
,z
in pairs
{GetMapZones(ci
)} do
7 zonei
[z
], zonec
[z
] = zi
, ci
12 local function MapPoint(zone
, x
, y
, desc
)
13 local zi
, zc
= zone
and zonei
[zone
], zone
and zonec
[zone
]
15 if zone
then TourGuide
:PrintF("Cannot find zone %q, using current zone.", zone
)
16 else TourGuide
:Print("No zone provided, using current zone.") end
18 zi
, zc
= GetCurrentMapZone(), GetCurrentMapContinent()
21 if TomTom
then TomTom
:AddZWaypoint(zc
, zi
, x
, y
, desc
) --AddZWaypoint(c,z,x,y,desc) select(z, GetMapZones(c))
22 elseif Cartographer_Waypoints
then Cartographer_Waypoints
:AddLHWaypoint(zc
, zi
, x
, y
, desc
) end -- continent, zone, x, y desc
26 function TourGuide
:ParseAndMapCoords(note
, desc
, zone
)
27 for x
,y
in note
:gmatch(L
.COORD_MATCH
) do MapPoint(zone
, tonumber(x
), tonumber(y
), desc
) end
31 --~ TODO: function TourGuide:PurgeWaypoints(desc)