Quantcast

Fix bogus references to opts.silent

Ludovicus Maior [06-28-19 - 13:36]
Fix bogus references to opts.silent
Filename
TomTom.lua
TomTom_POIIntegration.lua
diff --git a/TomTom.lua b/TomTom.lua
index e0a79e8..be7910f 100755
--- a/TomTom.lua
+++ b/TomTom.lua
@@ -1144,7 +1144,7 @@ function TomTom:SetClosestWaypoint()
         local ctxt = RoundCoords(x, y, 2)
         local desc = data.title and data.title or ""
         local sep = data.title and " - " or ""
-        if not opts.silent and self.profile.general.announce then
+        if 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
@@ -1155,7 +1155,9 @@ function TomTom:SetClosestWaypoint()
         else
            msg = L["|cffffff78TomTom:|r Could not find a closest waypoint in this continent."]
         end
-        ChatFrame1:AddMessage(msg)
+        if self.profile.general.announce then
+            ChatFrame1:AddMessage(msg)
+        end
     end
     return uid
 end
diff --git a/TomTom_POIIntegration.lua b/TomTom_POIIntegration.lua
index 09bfcd5..1e5a62c 100755
--- a/TomTom_POIIntegration.lua
+++ b/TomTom_POIIntegration.lua
@@ -205,7 +205,7 @@ local function poi_OnClick(self, button)
     if not x or not y then
         -- No coordinate information for this quest/objective
         local header = "|cFF33FF99TomTom|r"
-        if not opts.silent and self.profile.general.announce then
+        if 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