1 QuestHelper_File
["cartographer.lua"] = "Development Version"
2 QuestHelper_Loadtime
["cartographer.lua"] = GetTime()
9 local function cartographer_wp_update(c
, z
, x
, y
, desc
)
10 if cartographer_wp
then
11 cartographer_wp
:Cancel()
14 if not QuestHelper_Pref
.hide
and c
and c
>= 0 then
15 cartographer_wp
= QuestHelperPoint
:new(c
, z
, x
, y
, desc
)
16 Cartographer_Waypoints
:AddWaypoint(cartographer_wp
)
20 function QuestHelper
:EnableCartographer()
21 if Cartographer_Waypoints
and Waypoint
and not Waypoint
.prototype
then
22 if not QuestHelperPoint
then
23 QuestHelperPoint
= Waypoint
:new()
24 QuestHelperPoint
.ShowOnMap
= false
26 function QuestHelperPoint
:init(c
, z
, x
, y
, desc
)
27 self
.x
, self
.y
, self
.task
= x
, y
, desc
29 local zone
= QuestHelper
.Astrolabe
:GetMapVirtualZones(c
)[z
] -- wellllp
32 local LibBabble
= Rock("LibBabble-Zone-3.0", false, true)
34 zone
= LibBabble
:GetReverseLookupTable()[zone
]
41 function QuestHelperPoint
:Cancel()
44 if cartographer_wp
== self
then
51 function QuestHelperPoint
:ToString()
52 return self
.task
or "Waypoint"
56 if not cartographer_cb
then
57 cartographer_cb
= QuestHelper
:AddWaypointCallback(cartographer_wp_update
)
62 function QuestHelper
:DisableCartographer()
63 if cartographer_cb
then
64 if cartographer_wp
then
65 cartographer_wp
:Cancel()
68 QuestHelper
:RemoveWaypointCallback(cartographer_cb
)