From 0d005f1a515eb82b470ef3ba2cfa57df4271a108 Mon Sep 17 00:00:00 2001 From: Ludovicus Date: Mon, 24 Jun 2019 15:47:25 -0400 Subject: [PATCH] Add silencing to some errant AddMessage calls. --- TomTom.lua | 7 +++++-- TomTom_POIIntegration.lua | 5 ++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/TomTom.lua b/TomTom.lua index c5d7bbe..f038142 100755 --- a/TomTom.lua +++ b/TomTom.lua @@ -1135,8 +1135,10 @@ function TomTom:SetClosestWaypoint() local ctxt = RoundCoords(x, y, 2) local desc = data.title and data.title or "" local sep = data.title and " - " or "" - local msg = string.format(L["|cffffff78TomTom:|r Selected waypoint (%s%s%s) in %s"], desc, sep, ctxt, zoneName) - ChatFrame1:AddMessage(msg) + if not opts.silent and self.profile.general.announce then + local msg = string.format(L["|cffffff78TomTom:|r Selected waypoint (%s%s%s) in %s"], desc, sep, ctxt, zoneName) + ChatFrame1:AddMessage(msg) + end else local msg if not self.profile.arrow.closestusecontinent then @@ -1146,6 +1148,7 @@ function TomTom:SetClosestWaypoint() end ChatFrame1:AddMessage(msg) end + return uid end SLASH_TOMTOM_CLOSEST_WAYPOINT1 = "/cway" diff --git a/TomTom_POIIntegration.lua b/TomTom_POIIntegration.lua index b7df590..94ce985 100755 --- a/TomTom_POIIntegration.lua +++ b/TomTom_POIIntegration.lua @@ -205,7 +205,10 @@ local function poi_OnClick(self, button) if not x or not y then -- No coordinate information for this quest/objective local header = "|cFF33FF99TomTom|r" - print(L["%s: No coordinate information found for '%s' at this map level"]:format(header, title or self.questID)) + if not opts.silent and self.profile.general.announce then + local msg = L["%s: No coordinate information found for '%s' at this map level"]:format(header, title or self.questID) + ChatFrame1:AddMessage(msg) + end return end -- 1.7.9.5