* Added a compat version of TomTom:AddZWaypoint(c,z,x,y,desc) that works with other zones
James Whitehead Ii [10-11-07 - 13:36]
* Added a compat version of TomTom:AddZWaypoint(c,z,x,y,desc) that works with other zones
diff --git a/TomTom.lua b/TomTom.lua
index 06b57f4..4dc0dc3 100755
--- a/TomTom.lua
+++ b/TomTom.lua
@@ -131,7 +131,6 @@ function WorldMapButton_OnClick(...)
end
local function WaypointCallback(event, data, dist, lastdist)
- TomTom:Print(event, data, dist, lastdist)
if event == "OnDistanceArrive" then
TomTom:ClearWaypoint(data)
end
@@ -154,6 +153,12 @@ function TomTom:AddWaypoint(x,y,desc)
local point = self:SetWaypoint(c, z, x, y, nil, nil, 10, WaypointCallback)
self:SetCrazyArrow(point, 15)
end
+
+function TomTom:AddZWaypoint(c,z,x,y,desc)
+ local point = self:SetWaypoint(c,z,x,y,nil,nil,10,WaypointCallback)
+ self:SetCrazyArrow(point, 15)
+end
+
--[[
local Orig_WorldMapButton_OnClick = WorldMapButton_OnClick
diff --git a/TomTom_Waypoints.lua b/TomTom_Waypoints.lua
index 6ebdebb..9f436e5 100644
--- a/TomTom_Waypoints.lua
+++ b/TomTom_Waypoints.lua
@@ -168,6 +168,12 @@ do
local rad_135 = math.rad(135)
local minimap_count = 0
function Minimap_OnUpdate(self, elapsed)
+ local dist,x,y = Astrolabe:GetDistanceToIcon(self)
+ if not dist then
+ self:Hide()
+ return
+ end
+
minimap_count = minimap_count + elapsed
-- Only take action every 0.2 seconds
@@ -222,7 +228,6 @@ do
if callback then
-- Handle the logic/callbacks for arrival
- local dist,x,y = Astrolabe:GetDistanceToIcon(self)
local near,far,arrive = data.near,data.far,data.arrive
local state = data.state