From 43c3a2edfc0855fce396a263c8282a56e956def4 Mon Sep 17 00:00:00 2001 From: James Whitehead II Date: Sun, 16 Jan 2011 23:20:50 +0000 Subject: [PATCH] Fix the zone search on slash commands --- TomTom.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/TomTom.lua b/TomTom.lua index e37355e..b0ab094 100755 --- a/TomTom.lua +++ b/TomTom.lua @@ -779,7 +779,7 @@ function TomTom:AddWaypoint(x, y, desc, persistent, minimap, world, silent) return end - return self:AddZWaypoint(c, z, x/100, y/100, desc, persistent, minimap, world, nil, silent) + return self:AddZWaypoint(c, z, x, y, desc, persistent, minimap, world, nil, silent) end function TomTom:AddZWaypoint(c, z, x, y, desc, persistent, minimap, world, custom_callbacks, silent, crazy) @@ -1111,7 +1111,7 @@ SlashCmdList["TOMTOM_WAY"] = function(msg) for name,mapId in pairs(nameToMapId) do local lname = name:lower() if lname:match(zone) then - table.insert(matches, lname) + table.insert(matches, name) end end @@ -1160,7 +1160,7 @@ SlashCmdList["TOMTOM_WAY"] = function(msg) for name,mapId in pairs(nameToMapId) do local lname = name:lower() if lname:match(zone) then - table.insert(matches, lname) + table.insert(matches, name) end end @@ -1181,7 +1181,9 @@ SlashCmdList["TOMTOM_WAY"] = function(msg) x = tonumber(x) y = tonumber(y) - TomTom:AddMFWaypoint(mapId, nil, x, y, desc) + TomTom:AddMFWaypoint(mapId, nil, x/100, y/100, { + title = desc, + }) elseif tonumber(tokens[1]) then -- A vanilla set command local x,y,desc = unpack(tokens) -- 1.7.9.5