From baad7baa856dd959ef130b1bb283185eb72b58a0 Mon Sep 17 00:00:00 2001 From: Ludovicus Date: Wed, 19 Jun 2019 18:33:42 -0400 Subject: [PATCH] Do not register for QUEST_POI_UPDATE or QUEST_LOG_UPDATE in Classic. --- TomTom_POIIntegration.lua | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/TomTom_POIIntegration.lua b/TomTom_POIIntegration.lua index 288f5ff..b7df590 100755 --- a/TomTom_POIIntegration.lua +++ b/TomTom_POIIntegration.lua @@ -139,8 +139,10 @@ local function ObjectivesChanged() end local eventFrame = CreateFrame("Frame") -eventFrame:RegisterEvent("QUEST_POI_UPDATE") -eventFrame:RegisterEvent("QUEST_LOG_UPDATE") +if not addon.CLASSIC then + eventFrame:RegisterEvent("QUEST_POI_UPDATE") + eventFrame:RegisterEvent("QUEST_LOG_UPDATE") +end eventFrame:SetScript("OnEvent", function(self, event, ...) if event == "QUEST_POI_UPDATE" then @@ -232,9 +234,11 @@ local function poi_OnClick(self, button) SetCVar("questPOI", cvar and 1 or 0) end -hooksecurefunc("QuestPOIButton_OnClick", function(self, button) - poi_OnClick(self, button) -end) +if not addon.CLASSIC then + hooksecurefunc("QuestPOIButton_OnClick", function(self, button) + poi_OnClick(self, button) + end) +end function TomTom:EnableDisablePOIIntegration() enableClicks= TomTom.profile.poi.enable -- 1.7.9.5