diff --git a/WorldQuestTracker.lua b/WorldQuestTracker.lua index f4bc7977..ca3ccee2 100644 --- a/WorldQuestTracker.lua +++ b/WorldQuestTracker.lua @@ -1161,9 +1161,13 @@ function SlashCmdList.WQTRACKER (msg, editbox) return elseif (msg == "info") then - local widget = GetMouseFocus() + --local widget = GetMouseFocus() + ---@type uiobject[] + local uiObjects = GetMouseFoci() + + if (uiObjects and uiObjects[1]) then + local widget = uiObjects[1] - if (widget) then local info = {} --quest info diff --git a/WorldQuestTracker_Core.lua b/WorldQuestTracker_Core.lua index 0c4f137a..57167adc 100644 --- a/WorldQuestTracker_Core.lua +++ b/WorldQuestTracker_Core.lua @@ -2381,14 +2381,20 @@ WorldQuestTracker.OnToggleWorldMap = function(self) --play quick flash on squares showing quests of this faction for _, widget in ipairs(WorldQuestTracker.WorldSummaryQuestsSquares) do if (widget.FactionID == self.MyObject.FactionID) then - widget.LoopFlash:Play() + local bAwardReputation = C_QuestLog.DoesQuestAwardReputationWithFaction(widget.questID, factionID) + if (bAwardReputation) then + widget.LoopFlash:Play() + end end end --play quick flash on widgets shown in the world map(quest locations) for questCounter, button in pairs(WorldQuestTracker.WorldMapSmallWidgets) do if (button.FactionID == self.MyObject.FactionID) then - button.FactionPulseAnimation:Play() + local bAwardReputation = C_QuestLog.DoesQuestAwardReputationWithFaction(button.questID, factionID) + if (bAwardReputation) then + button.FactionPulseAnimation:Play() + end end end @@ -3476,7 +3482,7 @@ WorldQuestTracker.OnToggleWorldMap = function(self) button.Text = button:CreateFontString(nil, "overlay", "GameFontNormal") button.Text:SetText(name) - WorldQuestTracker:SetFontSize(button.Text, 10) + WorldQuestTracker:SetFontSize(button.Text, 11) WorldQuestTracker:SetFontColor(button.Text, "orange") button.Text:SetPoint("center") diff --git a/WorldQuestTracker_OptionsPanel.lua b/WorldQuestTracker_OptionsPanel.lua index 503f5063..5b97e509 100644 --- a/WorldQuestTracker_OptionsPanel.lua +++ b/WorldQuestTracker_OptionsPanel.lua @@ -576,7 +576,7 @@ function WorldQuestTrackerAddon.OpenOptionsPanel() WorldQuestTracker.SetSetting("use_old_icons", not WorldQuestTracker.db.profile.use_old_icons) end, name = "S_MAPBAR_OPTIONSMENU_EQUIPMENTICONS", - desc = "S_MAPBAR_OPTIONSMENU_EQUIPMENTICONS", + desc = "|TInterface\\AddOns\\WorldQuestTracker\\media\\options_visibility_context:" .. 49 .. ":" .. 87 .. ":0:0:256:256:" .. (0) .. ":" .. (87) .. ":" .. (131) .. ":" .. (131+49) .. "|t" }, { type = "toggle", @@ -598,7 +598,7 @@ function WorldQuestTrackerAddon.OpenOptionsPanel() DB.profile.close_blizz_popups.ABANDON_QUEST = value end, name = "S_OPTTIONS_AUTOACCEPT_ABANDONQUEST", - desc = "S_OPTTIONS_AUTOACCEPT_ABANDONQUEST_DESC", + desc = "|TInterface\\AddOns\\WorldQuestTracker\\media\\options_visibility_context:" .. 36 .. ":" .. 173 .. ":0:0:256:256:" .. (80) .. ":" .. (253) .. ":" .. (0) .. ":" .. (36) .. "|t" }, { type = "toggle", @@ -609,7 +609,7 @@ function WorldQuestTrackerAddon.OpenOptionsPanel() DB.profile.numerate_quests = value end, name = "S_OPTTIONS_NUMERATE_QUEST", - desc = "S_OPTTIONS_NUMERATE_QUEST_DESC", + desc = "|TInterface\\AddOns\\WorldQuestTracker\\media\\options_visibility_context:" .. 30 .. ":" .. 90 .. ":0:0:256:256:" .. (0) .. ":" .. (90) .. ":" .. (100) .. ":" .. (130) .. "|t" }, {type = "blank"}, @@ -628,7 +628,7 @@ function WorldQuestTrackerAddon.OpenOptionsPanel() WorldQuestTracker.SetSetting("pathdots", "enabled", value) end, name = "S_ENABLE", - desc = "S_ENABLE", + desc = "|TInterface\\AddOns\\WorldQuestTracker\\media\\options_visibility_context:" .. 30 .. ":" .. 134 .. ":0:0:256:256:" .. (91) .. ":" .. (225) .. ":" .. (100) .. ":" .. (130) .. "|t" }, {type = "blank"}, @@ -732,7 +732,7 @@ function WorldQuestTrackerAddon.OpenOptionsPanel() end, name = "S_OPTIONS_SHOWFACTIONS", - desc = "|TInterface\\AddOns\\WorldQuestTracker\\media\\options_visibility_context:" .. 33 .. ":" .. 208 .. ":0:0:256:256:" .. (0) .. ":" .. (208) .. ":" .. (36+30) .. ":" .. (36+30+33) .. "|t\n\n" .. "S_OPTIONS_SHOWFACTIONS", + desc = "|TInterface\\AddOns\\WorldQuestTracker\\media\\options_visibility_context:" .. 33 .. ":" .. 208 .. ":0:0:256:256:" .. (0) .. ":" .. (208) .. ":" .. (36+30) .. ":" .. (36+30+33) .. "|t", }, { type = "toggle", diff --git a/WorldQuestTracker_WorldMap.lua b/WorldQuestTracker_WorldMap.lua index f74672ae..3f2c5d4b 100644 --- a/WorldQuestTracker_WorldMap.lua +++ b/WorldQuestTracker_WorldMap.lua @@ -913,6 +913,12 @@ function WorldQuestTracker.UpdateWorldWidget(widget, questID, numObjectives, map widget.IsCriteria = isCriteria widget.TimeLeft = timeLeft + local bAwardReputation = C_QuestLog.DoesQuestAwardReputationWithFaction(questID, factionID) + if (not bAwardReputation) then + widget.FactionID = nil + factionID = nil + end + if (isArtifact) then artifactPowerIcon = WorldQuestTracker.GetArtifactPowerIcon(isArtifact, true, questID) widget.isArtifact = isArtifact diff --git a/WorldQuestTracker_ZoneMap.lua b/WorldQuestTracker_ZoneMap.lua index a0bbfaa0..13230a9f 100644 --- a/WorldQuestTracker_ZoneMap.lua +++ b/WorldQuestTracker_ZoneMap.lua @@ -1814,7 +1814,21 @@ function WorldQuestTracker.SetupZoneSummaryButton(summaryWidget, zoneWidget) summaryWidget.timeLeftText:SetJustifyH("center") summaryWidget.timeLeftText:Show() - summaryWidget.factionIcon:SetTexture(WorldQuestTracker.MapData.FactionIcons [widget.FactionID]) --faction texture + local factionID = widget.FactionID + if (factionID) then + local factionTexture = WorldQuestTracker.MapData.FactionIcons[factionID] + if (factionTexture) then + --check if this quest is realy giving reputation + local bAwardReputation = C_QuestLog.DoesQuestAwardReputationWithFaction(questID, factionID) + if (bAwardReputation) then + summaryWidget.factionIcon:SetTexture(factionTexture) + end + else + summaryWidget.factionIcon:SetTexture("") + end + else + summaryWidget.factionIcon:SetTexture("") + end summaryWidget:Show() end diff --git a/libs/DF/fw.lua b/libs/DF/fw.lua index 3cf03adc..389d2eb6 100644 --- a/libs/DF/fw.lua +++ b/libs/DF/fw.lua @@ -1,6 +1,6 @@ -local dversion = 563 +local dversion = 565 local major, minor = "DetailsFramework-1.0", dversion local DF, oldminor = LibStub:NewLibrary(major, minor) @@ -1840,12 +1840,14 @@ function DF:GetAllTalents() local borderTypes = Enum.TraitNodeEntryType if (traitEntryInfo.type) then -- == borderTypes.SpendCircle local definitionId = traitEntryInfo.definitionID - local traitDefinitionInfo = C_Traits.GetDefinitionInfo(definitionId) - local spellId = traitDefinitionInfo.overriddenSpellID or traitDefinitionInfo.spellID - local spellName, _, spellTexture = GetSpellInfo(spellId) - if (spellName) then - local talentInfo = {Name = spellName, ID = spellId, Texture = spellTexture, IsSelected = (activeEntry and activeEntry.rank and activeEntry.rank > 0) or false} - allTalents[#allTalents+1] = talentInfo + if definitionId then + local traitDefinitionInfo = C_Traits.GetDefinitionInfo(definitionId) + local spellId = traitDefinitionInfo.overriddenSpellID or traitDefinitionInfo.spellID + local spellName, _, spellTexture = GetSpellInfo(spellId) + if (spellName) then + local talentInfo = {Name = spellName, ID = spellId, Texture = spellTexture, IsSelected = (activeEntry and activeEntry.rank and activeEntry.rank > 0) or false} + allTalents[#allTalents+1] = talentInfo + end end end end @@ -4889,16 +4891,18 @@ function DF:GetCharacterTalents(bOnlySelected, bOnlySelectedHash) if (traitEntryInfo.type) then -- == borderTypes.SpendCircle local definitionId = traitEntryInfo.definitionID - local traitDefinitionInfo = C_Traits.GetDefinitionInfo(definitionId) - local spellId = traitDefinitionInfo.overriddenSpellID or traitDefinitionInfo.spellID - local spellName, _, spellTexture = GetSpellInfo(spellId) - local bIsSelected = (activeEntry and activeEntry.rank and activeEntry.rank > 0) or false - if (spellName and bIsSelected) then - local talentInfo = {Name = spellName, ID = spellId, Texture = spellTexture, IsSelected = true} - if (bOnlySelectedHash) then - talentList[spellId] = talentInfo - else - table.insert(talentList, talentInfo) + if definitionId then + local traitDefinitionInfo = C_Traits.GetDefinitionInfo(definitionId) + local spellId = traitDefinitionInfo.overriddenSpellID or traitDefinitionInfo.spellID + local spellName, _, spellTexture = GetSpellInfo(spellId) + local bIsSelected = (activeEntry and activeEntry.rank and activeEntry.rank > 0) or false + if (spellName and bIsSelected) then + local talentInfo = {Name = spellName, ID = spellId, Texture = spellTexture, IsSelected = true} + if (bOnlySelectedHash) then + talentList[spellId] = talentInfo + else + table.insert(talentList, talentInfo) + end end end end diff --git a/libs/DF/icon.lua b/libs/DF/icon.lua index 819c048e..6c14e4b5 100644 --- a/libs/DF/icon.lua +++ b/libs/DF/icon.lua @@ -282,17 +282,19 @@ detailsFramework.IconMixin = { --iconFrame.Border:SetColorTexture(0, 0, 0, 1) if (startTime) then - CooldownFrame_Set(iconFrame.Cooldown, startTime, duration, true, true, modRate) + local now = GetTime() + + iconFrame.timeRemaining = (startTime + duration - now) / (modRate or 1) + iconFrame.expirationTime = startTime + duration + + if iconFrame.timeRemaining > 0 then + CooldownFrame_Set(iconFrame.Cooldown, startTime, duration, true, true, modRate) + end if (self.options.show_text) then iconFrame.CountdownText:Show() - local now = GetTime() - - iconFrame.timeRemaining = (startTime + duration - now) / modRate - iconFrame.expirationTime = startTime + duration - - local formattedTime = (iconFrame.timeRemaining > 0) and self.options.decimal_timer and iconFrame.parentIconRow.FormatCooldownTimeDecimal(iconFrame.timeRemaining) or iconFrame.parentIconRow.FormatCooldownTime(iconFrame.timeRemaining) or "" + local formattedTime = (iconFrame.timeRemaining > 0) and (self.options.decimal_timer and iconFrame.parentIconRow.FormatCooldownTimeDecimal(iconFrame.timeRemaining) or iconFrame.parentIconRow.FormatCooldownTime(iconFrame.timeRemaining)) or "" iconFrame.CountdownText:SetText(formattedTime) iconFrame.CountdownText:SetPoint(self.options.text_anchor or "center", iconFrame, self.options.text_rel_anchor or "center", self.options.text_x_offset or 0, self.options.text_y_offset or 0) diff --git a/locales/enUS.lua b/locales/enUS.lua index e5f6983b..d1aaa3cb 100644 --- a/locales/enUS.lua +++ b/locales/enUS.lua @@ -8,10 +8,8 @@ L["S_SPEEDRUN_AUTO_COMPLETE"] = "Auto Complete Quests" L["S_SPEEDRUN_CANCEL_CINEMATIC"] = "Auto Skip Cinematics" L["S_OPTTIONS_NUMERATE_QUEST"] = "Enumerate Quests" -L["S_OPTTIONS_NUMERATE_QUEST_DESC"] = "Show a number for each quest in the map frame and in the objective tracker." L["S_OPTTIONS_AUTOACCEPT_ABANDONQUEST"] = "Auto Accept Abandon Quests" -L["S_OPTTIONS_AUTOACCEPT_ABANDONQUEST_DESC"] = "Don't show the confirmation dialog when abandoning a quest." L["S_TRACKEROPTIONS_BACKGROUNDALPHA"] = "Background Alpha" diff --git a/media/options_visibility_context.tga b/media/options_visibility_context.tga index 39d7d3b8..69d72fdd 100644 Binary files a/media/options_visibility_context.tga and b/media/options_visibility_context.tga differ