From adb14c93ec684051980304c5a992cca57eba00e7 Mon Sep 17 00:00:00 2001 From: Jim Whitehead Date: Sat, 31 Jan 2015 10:17:23 +0100 Subject: [PATCH] Add explicit function for adding waypoint to current zone --- TomTom.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) 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. -- 1.7.9.5