public
Description: WoW Powerleveling addon
Homepage: http://www.tekkub.net/
Clone URL: git://github.com/tekkub/tourguide.git
Click here to lend your support to: tourguide and make a donation at www.pledgie.com !
Might fix Carto waypoints not going away on objective completion, might 
just fuck up Carto support completely... not that I care either way :P
tekkub (author)
Tue Jan 01 20:44:04 -0800 2008
commit  caf940008ef8dce9d0cf859b601ddbaf67541f7a
tree    ff907f74e476742802daf2d2e18e59e606e430c0
parent  e87605f1d745bbd2956137a782a3c7609172aff5
...
1
2
3
4
 
5
6
 
 
7
8
9
10
11
 
12
13
14
...
17
18
19
 
20
21
22
23
 
 
 
 
 
24
25
26
...
58
59
60
 
 
 
 
 
61
62
63
...
1
2
3
 
4
5
 
6
7
8
9
10
11
12
13
14
15
16
...
19
20
21
22
23
24
25
 
26
27
28
29
30
31
32
33
...
65
66
67
68
69
70
71
72
73
74
75
0
@@ -1,14 +1,16 @@
0
 
0
 local L = TourGuide.Locale
0
 
0
-local zonei, zonec = {}, {}
0
+local zonei, zonec, zonenames = {}, {}, {}
0
 for ci,c in pairs{GetMapContinents()} do
0
- for zi,z in pairs{GetMapZones(ci)} do
0
+ zonenames[ci] = {GetMapZones(ci)}
0
+ for zi,z in pairs(zonenames[ci]) do
0
     zonei[z], zonec[z] = zi, ci
0
   end
0
 end
0
 
0
 
0
+local cache = {}
0
 local function MapPoint(zone, x, y, desc)
0
   TourGuide:DebugF(1, "Mapping %q - %s (%.2f, %.2f)", desc, zone, x, y)
0
   local zi, zc = zone and zonei[zone], zone and zonec[zone]
0
@@ -17,10 +19,15 @@ local function MapPoint(zone, x, y, desc)
0
     else TourGuide:Print("No zone provided, using current zone.") end
0
 
0
     zi, zc = GetCurrentMapZone(), GetCurrentMapContinent()
0
+ zone = zonenames[zc][zi]
0
   end
0
 
0
   if TomTom then TomTom:AddZWaypoint(zc, zi, x, y, "[TG] "..desc) --AddZWaypoint(c,z,x,y,desc) select(z, GetMapZones(c))
0
- elseif Cartographer_Waypoints then Cartographer_Waypoints:AddLHWaypoint(zc, zi, x, y, desc) end -- continent, zone, x, y desc
0
+ elseif Cartographer_Waypoints then
0
+ local pt = NotePoint:new(zone, x/100, y/100, "[TG] "..desc)
0
+ Cartographer_Waypoints:AddWaypoint(pt)
0
+ table.insert(cache, pt.WaypointID)
0
+ end
0
 end
0
 
0
 
0
@@ -58,6 +65,11 @@ function TourGuide:ParseAndMapCoords(note, desc, zone)
0
         end
0
       end
0
     end
0
+ elseif Cartographer_Waypoints then
0
+ while cache[1] do
0
+ local pt = table.remove(cache)
0
+ Cartographer_Waypoints:CancelWaypoint(pt)
0
+ end
0
   end
0
 
0
   if not note then return end

Comments

    No one has commented yet.