Quantcast

Add a clear waypoints function so that you can remove the ARL waypoints from tom tom if you wish. Also updatd a vendor location.

ackis [02-18-09 - 03:38]
Add a clear waypoints function so that you can remove the ARL waypoints from tom tom if you wish.  Also updatd a vendor location.
Filename
ARLConfig.lua
ARLFrame.lua
Locals/ARLLocals-enUS.lua
RecipeDB/ARL-Vendor.lua
diff --git a/ARLConfig.lua b/ARLConfig.lua
index f02fd8f..4ea7937 100644
--- a/ARLConfig.lua
+++ b/ARLConfig.lua
@@ -1213,6 +1213,13 @@ local function fullOptions()
 							get		= function() return addon.db.profile.minimap end,
 							set		= function() addon.db.profile.minimap = not addon.db.profile.minimap end,
 						},
+						clearmap = {
+							order	= 65,
+							type	= "execute",
+							name	= L["Clear Waypoints"],
+							desc	= L["CLEAR_WAYPOINTS_DESC"],
+							func	= function(info) addon:ClearMap() end,
+						},
 					},
 				},
 			},
diff --git a/ARLFrame.lua b/ARLFrame.lua
index 68b7bef..f6119df 100644
--- a/ARLFrame.lua
+++ b/ARLFrame.lua
@@ -306,6 +306,23 @@ do
 	LoadZones(C3,c3,GetMapZones(3))
 	LoadZones(C4,c4,GetMapZones(4))

+	local iconlist = {}
+
+	-- Description:
+	-- Expected result:
+	-- Input:
+	-- Output:
+
+	function addon:ClearMap()
+
+		for i in pairs(iconlist) do
+			TomTom:RemoveWaypoint(i)
+		end
+
+		table.wipe(iconlist)
+
+	end
+
 	-- Description:
 	-- Expected result:
 	-- Input:
@@ -400,7 +417,8 @@ do
 					--@debug@
 					addon:Print("Adding vendor ID: " .. k .. " to the world map at coords " .. vendorDB[k]["Coordx"] .. "," .. vendorDB[k]["Coordy"].. " with continent ID: " .. continent .. " and zone ID: " .. zone .. ".")
 					--@end-debug@
-					TomTom:AddZWaypoint(continent, zone, vendorDB[k]["Coordx"], vendorDB[k]["Coordy"], vendorDB[k]["Name"], false, minimap, worldmap)
+					local iconuid = TomTom:AddZWaypoint(continent, zone, vendorDB[k]["Coordx"], vendorDB[k]["Coordy"], vendorDB[k]["Name"], false, minimap, worldmap)
+					tinsert(iconlist,iconuid)
 				end

 			end
diff --git a/Locals/ARLLocals-enUS.lua b/Locals/ARLLocals-enUS.lua
index 0a48b82..8348f4b 100644
--- a/Locals/ARLLocals-enUS.lua
+++ b/Locals/ARLLocals-enUS.lua
@@ -125,6 +125,8 @@ L["World Map"]				= true
 L["Mini Map"]				= true
 L["WORLDMAP_DESC"]			= "Do you want missing vendor recipes to appear on the world map."
 L["MINIMAP_DESC"]			= "Do you want missing vendor recipes to appear on the mini map."
+L["Clear Waypoints"]		= true
+L["CLEAR_WAYPOINTS_DESC"]	= "Remove all ARL waypoints from TomTom."

 -- Filter Config Options
 L["Filtering Options"]		= true
diff --git a/RecipeDB/ARL-Vendor.lua b/RecipeDB/ARL-Vendor.lua
index 80c5dd1..f66b3b9 100644
--- a/RecipeDB/ARL-Vendor.lua
+++ b/RecipeDB/ARL-Vendor.lua
@@ -368,7 +368,7 @@ function addon:InitVendor(VendorDB)
 	self:addLookupList(VendorDB,27147,L["Librarian Erickson"],BZONE["Borean Tundra"],45.94,32.68,0)
 	self:addLookupList(VendorDB,27666,L["Ontuvo"],BZONE["Zul'Aman"],0,0,0)
 	self:addLookupList(VendorDB,28714,L["Ildine Sorrowspear"],BZONE["Dalaran"],39.21,41.02,0)
-	self:addLookupList(VendorDB,28721,L["Tiffany Cartier"],BZONE["Dalaran"],32.22,26.74,0)
+	self:addLookupList(VendorDB,28721,L["Tiffany Cartier"],BZONE["Dalaran"],40.5,34.4,0)
 	self:addLookupList(VendorDB,28722,L["Bryan Landers"],BZONE["Dalaran"],38.90,25.50,0)
 	self:addLookupList(VendorDB,29510,L["Linna Bruder"],BZONE["Dalaran"],34.72,33.58,0)
 	self:addLookupList(VendorDB,29511,L["Lalla Brightweave"],BZONE["Dalaran"],36.72,33.34,0)