From b6be6279a0b12e47a828a903c91817c4a25f5247 Mon Sep 17 00:00:00 2001 From: Ludovicus Date: Thu, 26 Jul 2018 18:27:03 -0400 Subject: [PATCH] If the WorldMap is open, use the map's MapID, else guess the current players' map for a QuestPOI. --- TomTom_POIIntegration.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/TomTom_POIIntegration.lua b/TomTom_POIIntegration.lua index 9ea4147..db35d92 100755 --- a/TomTom_POIIntegration.lua +++ b/TomTom_POIIntegration.lua @@ -172,7 +172,7 @@ local function poi_OnClick(self, button) SetCVar("questPOI", 1) -- Run our logic, and set a waypoint for this button - local m = C_Map.GetBestMapForUnit("player") + local m QuestPOIUpdateIcons() @@ -182,6 +182,12 @@ local function poi_OnClick(self, button) if questIndex and questIndex ~= 0 then title = GetQuestLogTitle(questIndex) completed, x, y = QuestPOIGetIconInfo(self.questID) + -- If the WorldMap is open, use the map's MapID, else guess the current players' map + if WorldMapFrame:IsShown() then + m = WorldMapFrame:GetMapID() + else + m = C_Map.GetBestMapForUnit("player") + end else -- Must be a World Quest title = C_TaskQuest.GetQuestInfoByQuestID(self.questID) -- 1.7.9.5