From 44fad1c3c2159ac186888118d70331a8deab58d2 Mon Sep 17 00:00:00 2001 From: Ludovicus Date: Fri, 5 Jul 2019 15:29:54 -0400 Subject: [PATCH] Announce [Could not find a closest waypoint] message only if /cway was used. --- TomTom.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/TomTom.lua b/TomTom.lua index b6b4efb..7d411a5 100755 --- a/TomTom.lua +++ b/TomTom.lua @@ -1191,7 +1191,7 @@ function TomTom:GetClosestWaypoint() end end -function TomTom:SetClosestWaypoint() +function TomTom:SetClosestWaypoint(verbose) local uid = self:GetClosestWaypoint() if uid then local data = uid @@ -1212,7 +1212,7 @@ function TomTom:SetClosestWaypoint() else msg = L["|cffffff78TomTom:|r Could not find a closest waypoint in this continent."] end - if self.profile.general.announce then + if verbose then ChatFrame1:AddMessage(msg) end end @@ -1222,7 +1222,7 @@ end SLASH_TOMTOM_CLOSEST_WAYPOINT1 = "/cway" SLASH_TOMTOM_CLOSEST_WAYPOINT2 = "/closestway" SlashCmdList["TOMTOM_CLOSEST_WAYPOINT"] = function(msg) - TomTom:SetClosestWaypoint() + TomTom:SetClosestWaypoint(true) end SLASH_TOMTOM_WAYBACK1 = "/wayb" -- 1.7.9.5