From d82afc48f3c46e1d63547f2e1a2ae33ee9b94f27 Mon Sep 17 00:00:00 2001 From: Tercioo Date: Sat, 20 Jul 2019 15:13:06 -0300 Subject: [PATCH] Fixed some panels and Hide emissary quest info - Fixed some panels which was giving errors at opening. - Added option to show/hide emissary quest info above their circles. --- WorldQuestTracker_Core.lua | 23 +++++++++++++++++++++-- WorldQuestTracker_Initialize.lua | 2 ++ WorldQuestTracker_ZoneMap.lua | 25 +++++++++++++++++-------- 3 files changed, 40 insertions(+), 10 deletions(-) diff --git a/WorldQuestTracker_Core.lua b/WorldQuestTracker_Core.lua index 033ba1be..b6698315 100644 --- a/WorldQuestTracker_Core.lua +++ b/WorldQuestTracker_Core.lua @@ -520,7 +520,7 @@ WorldQuestTracker.OnToggleWorldMap = function (self) local f = DF:CreateSimplePanel (UIParent, 460, 90, "Discord Server", "WorldQuestTrackerSharePanel") f:SetFrameStrata ("TOOLTIP") - f:SetPoint ("center", WorldMapScrollFrame, "center") + f:SetPoint ("center", UIParent, "center", 0, 0) DF:CreateBorder (f) @@ -1028,11 +1028,26 @@ WorldQuestTracker.OnToggleWorldMap = function (self) return end + if (option == "emissary_quest_info") then + WorldQuestTracker.db.profile.show_emissary_info = value + GameCooltip:Hide() + if (WorldQuestTrackerAddon.GetCurrentZoneType() == "zone") then + WorldQuestTracker.UpdateZoneSummaryFrame() + end + return + end + if (option == "show_summary_minimize_button") then WorldQuestTracker.db.profile.show_summary_minimize_button = value + if (WorldQuestTrackerAddon.GetCurrentZoneType() == "zone") then WorldQuestTracker.UpdateZoneSummaryFrame() end + if (WorldQuestTrackerAddon.GetCurrentZoneType() == "world") then + WorldQuestTracker.UpdateWorldQuestsOnWorldMap() + end + + WorldQuestTracker.ForceRefreshBountyBoard() GameCooltip:Hide() return @@ -4051,6 +4066,11 @@ WorldQuestTracker.OnToggleWorldMap = function (self) add_checkmark_icon (WorldQuestTracker.db.profile.bar_visible, true) GameCooltip:AddMenu (1, options_on_click, "bar_visible", not WorldQuestTracker.db.profile.bar_visible) + --show emissary quest info + GameCooltip:AddLine ("Emissary Quest Info") + add_checkmark_icon (WorldQuestTracker.db.profile.show_emissary_info, true) + GameCooltip:AddMenu (1, options_on_click, "emissary_quest_info", not WorldQuestTracker.db.profile.show_emissary_info) + -- frame scale and frame align options GameCooltip:AddLine ("$div") -- @@ -4733,7 +4753,6 @@ WorldQuestTracker.OnToggleWorldMap = function (self) if (not WorldMapFrame.isMaximized) then WorldQuestTracker.UpdateWorldMapFrameAnchor() end - -- ~frame scale if (WorldQuestTracker.db.profile.map_frame_scale_enabled) then diff --git a/WorldQuestTracker_Initialize.lua b/WorldQuestTracker_Initialize.lua index f8bc9a36..e91513a2 100644 --- a/WorldQuestTracker_Initialize.lua +++ b/WorldQuestTracker_Initialize.lua @@ -138,6 +138,8 @@ do disable_world_map_widgets = false, + show_emissary_info = true, + worldmap_widgets = { textsize = 9, scale = 1, diff --git a/WorldQuestTracker_ZoneMap.lua b/WorldQuestTracker_ZoneMap.lua index 898f20ac..bf960c80 100644 --- a/WorldQuestTracker_ZoneMap.lua +++ b/WorldQuestTracker_ZoneMap.lua @@ -1668,21 +1668,27 @@ if (bountyBoard) then local numCompleted, numTotal = self:CalculateBountySubObjectives (bounty) - if (numCompleted) then - bountyButton.objectiveCompletedText:SetText (numCompleted .. "/" .. numTotal) - bountyButton.objectiveCompletedText:SetAlpha (.92) - bountyButton.objectiveCompletedBackground:SetAlpha (.4) - - if (not bountyButton.objectiveCompletedText:IsShown()) then - bountyButton.objectiveCompletedAnimation:Play() + if (WorldQuestTracker.db.profile.show_emissary_info) then + if (numCompleted) then + bountyButton.objectiveCompletedText:SetText (numCompleted .. "/" .. numTotal) + bountyButton.objectiveCompletedText:SetAlpha (.92) + bountyButton.objectiveCompletedBackground:SetAlpha (.4) + + if (not bountyButton.objectiveCompletedText:IsShown()) then + bountyButton.objectiveCompletedAnimation:Play() + end + else + bountyButton.objectiveCompletedText:SetText ("") + bountyButton.objectiveCompletedBackground:SetAlpha (0) end else bountyButton.objectiveCompletedText:SetText ("") bountyButton.objectiveCompletedBackground:SetAlpha (0) end + local bountyQuestID = bounty.questID - if (bountyQuestID and HaveQuestData (bountyQuestID)) then + if (bountyQuestID and HaveQuestData (bountyQuestID) and WorldQuestTracker.db.profile.show_emissary_info) then local questIndex = GetQuestLogIndexByID (bountyQuestID) local title, level, suggestedGroup, isHeader, isCollapsed, isComplete, frequency, questID, startEvent, displayQuestID, isOnMap, hasLocalPOI, isTask, isStory = GetQuestLogTitle (questIndex) @@ -1741,6 +1747,9 @@ if (bountyBoard) then end end + else + bountyButton.timeLeftText:SetText ("") + --bountyButton.Icon:SetTexture (nil) end bountyButton.lastUpdateByWQT = GetTime()