1 QuestHelper_File
["cartographer.lua"] = "Development Version"
8 local function cartographer_wp_update(c
, z
, x
, y
, desc
)
9 if cartographer_wp
then
10 cartographer_wp
:Cancel()
14 cartographer_wp
= QuestHelperPoint
:new(c
, z
, x
, y
, desc
)
15 Cartographer_Waypoints
:AddWaypoint(cartographer_wp
)
19 function QuestHelper
:EnableCartographer()
20 if Cartographer_Waypoints
and Waypoint
and not Waypoint
.prototype
then
21 if not QuestHelperPoint
then
22 QuestHelperPoint
= Waypoint
:new()
23 QuestHelperPoint
.ShowOnMap
= false
25 function QuestHelperPoint
:init(c
, z
, x
, y
, desc
)
26 self
.x
, self
.y
, self
.task
= x
, y
, desc
28 local zone
= select(z
, GetMapZones(c
))
31 local LibBabble
= Rock("LibBabble-Zone-3.0", false, true)
33 zone
= LibBabble
:GetReverseLookupTable()[zone
]
40 function QuestHelperPoint
:Cancel()
43 if cartographer_wp
== self
then
50 function QuestHelperPoint
:ToString()
51 return self
.task
or "Waypoint"
55 if not cartographer_cb
then
56 cartographer_cb
= QuestHelper
:AddWaypointCallback(cartographer_wp_update
)
61 function QuestHelper
:DisableCartographer()
62 if cartographer_cb
then
63 if cartographer_wp
then
64 cartographer_wp
:Cancel()
67 QuestHelper
:RemoveWaypointCallback(cartographer_cb
)