Add explicit function for adding waypoint to current zone
Jim Whitehead [01-31-15 - 09:17]
Add explicit function for adding waypoint to current zone
diff --git a/TomTom.lua b/TomTom.lua
index 3216ca3..58c4b2c 100755
--- a/TomTom.lua
+++ b/TomTom.lua
@@ -821,6 +821,17 @@ function TomTom:AddZWaypoint(c, z, x, y, desc, persistent, minimap, world, callb
})
end
+function TomTom:AddWaypointToCurrentZone(x, y, desc)
+ local m, f = TomTom:GetCurrentPlayerPosition()
+ if not m then
+ return
+ end
+
+ return self:AddMFWaypoint(m, f, x/100, y/100, {
+ title = desc,
+ })
+end
+
-- Return a set of default callbacks that can be used by addons to provide
-- more detailed functionality without losing the tooltip and onclick
-- functionality.