From b3df9b94eeae9f9f72a4c95b2909b1291d846e29 Mon Sep 17 00:00:00 2001 From: James Whitehead II Date: Sun, 6 Apr 2008 07:42:37 +0000 Subject: [PATCH] * Added a comment clarifying that TomTom_Waypoints API is private * When a duplicate waypoint is set, return the original uid --- TomTom.lua | 4 ++-- TomTom_Waypoints.lua | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/TomTom.lua b/TomTom.lua index 724ba26..548507c 100755 --- a/TomTom.lua +++ b/TomTom.lua @@ -648,8 +648,8 @@ function TomTom:AddZWaypoint(c, z, x, y, desc, persistent, minimap, world) for uid in pairs(waypoints[zone]) do local data = waypoints[uid] if data.title == desc and data.coord == coord then - -- This is a duplicate waypoint - return + -- This is a duplicate waypoint, so return that uid + return uid end end end diff --git a/TomTom_Waypoints.lua b/TomTom_Waypoints.lua index 135dd68..46ddfef 100644 --- a/TomTom_Waypoints.lua +++ b/TomTom_Waypoints.lua @@ -1,5 +1,11 @@ --[[-------------------------------------------------------------------------- -- TomTom - A navigational assistant for World of Warcraft +-- +-- This file contains the internal implementation of TomTom's waypoints. +-- None of these functions should be called directly by addons if they want +-- the waypoints to obey normal TomTom options and behavior. In otherwords +-- don't call TomTom:SetWaypoint() or TomTom:ClearWaypoint(), use the public +-- TomTom:AddZWaypoint() and TomTom:RemoveWaypoint() instead. ----------------------------------------------------------------------------]] -- Import Astrolabe for locations -- 1.7.9.5