Adding magic localization table, deDE locale strings from decimad
[WoW-TourGuide.git] / Mapping.lua
blobc7fce0f9c587d6bcb5ba106205020c1249d432dd
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
8 end
9 end
12 local function MapPoint(zone, x, y, desc)
13 local zi, zc = zone and zonei[zone], zone and zonec[zone]
14 if not zi then
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()
19 end
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
23 end
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
28 end
31 --~ TODO: function TourGuide:PurgeWaypoints(desc)
32 --~ end