remove extra +x
[QuestHelper.git] / tomtom.lua
blob21dba3a6534fb55805978a4b17ec750cdba24cb6
1 QuestHelper_File["tomtom.lua"] = "Development Version"
3 local tomtom_cb
4 local tomtom_uid
6 local function tomtom_wp_update(c, z, x, y, desc)
7 if tomtom_uid then
8 TomTom:RemoveWaypoint(tomtom_uid)
9 tomtom_uid = nil
10 end
12 if not QuestHelper_Pref.hide and c and c >= 0 then
13 tomtom_uid = TomTom:AddZWaypoint(c, z, x*100, y*100, desc, false, false, false)
14 end
15 end
17 function QuestHelper:EnableTomTom()
18 if TomTom then
19 if not tomtom_cb then
20 tomtom_cb = QuestHelper:AddWaypointCallback(tomtom_wp_update)
21 end
22 end
23 end
25 function QuestHelper:DisableTomTom()
26 if tomtom_cb then
27 if tomtom_uid then
28 TomTom:RemoveWaypoint(tomtom_uid)
29 end
31 QuestHelper:RemoveWaypointCallback(tomtom_cb)
32 tomtom_cb = nil
33 end
34 end