Skip to content

Commit

Permalink
fix quest tracker logic, update .toc for 10.1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
vaindil committed Jul 14, 2023
1 parent 61bf2da commit 6be157b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
4 changes: 2 additions & 2 deletions WowheadQuickLink.toc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Interface: 100100
## Interface: 100105
## Interface-Wrath: 30402
## Interface-Classic: 11403
## Version: 2.15.5
## Version: 2.15.6
## Title: Wowhead Quick Link
## Notes: Mouse over and press CTRL-C on (almost) anything to generate a Wowhead link.
## Author: Blur
Expand Down
22 changes: 19 additions & 3 deletions WowheadQuickLinkStrategies.lua
Original file line number Diff line number Diff line change
Expand Up @@ -216,16 +216,27 @@ end


function strategies.wowhead.GetTrackerFromFocus(data)
if (data.focus.id and not data.focus.module) or not data.focus:GetParent() then return end
local parent = data.focus:GetParent()
if (data.focus.id and not data.focus.module) or not parent then return end
local id = data.focus.id or parent.id

-- handled in GetTradingPostActivityFromTracker because i'm not refactoring this right now
if parent.module == MONTHLY_ACTIVITIES_TRACKER_MODULE then
return
end

if parent.module == PROFESSION_RECIPE_TRACKER_MODULE then
return id, "spell"
end

local focusName = data.focus:GetName()
if parent.module == ACHIEVEMENT_TRACKER_MODULE or
(focusName ~= nil and string.find(focusName, "^AchievementFrameCriteria") ~= nil) or
(focusName and string.find(focusName, "^AchievementFrameCriteria")) or
-- support Kaliel's Tracker
(data.focus.module ~= nil and data.focus.module.friendlyName == "ACHIEVEMENT_TRACKER_MODULE") then
(data.focus.module and data.focus.module.friendlyName == "ACHIEVEMENT_TRACKER_MODULE") then
return id, "achievement"
end

return id, "quest"
end

Expand Down Expand Up @@ -387,6 +398,11 @@ function strategies.wowheadTradingPostActivity.GetTradingPostActivity(data)
return data.focus.id
end

function strategies.wowheadTradingPostActivity.GetTradingPostActivityFromTracker(data)
local parent = data.focus:GetParent()
if (parent.module == MONTHLY_ACTIVITIES_TRACKER_MODULE and parent.id) then return parent.id end
end

local function HookTooltip(tooltip)
tooltipStates[tooltip] = {}
hooksecurefunc(tooltip, "SetHyperlink", function(tooltip, hyperlink)
Expand Down

0 comments on commit 6be157b

Please sign in to comment.