Skip to content

Commit

Permalink
Fixed quest reward tooltips
Browse files Browse the repository at this point in the history
  • Loading branch information
ckaotik committed Jul 9, 2015
1 parent 51729af commit c17f16c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion modules/tooltip.lua
Original file line number Diff line number Diff line change
Expand Up @@ -266,13 +266,18 @@ local function OnTooltipSetItem(self)
end

local function OnTooltipSetQuestItem(self, itemType, index)
local link = GetQuestItemLink(itemType, index)
AddItemComparison(self, link)
end

local function OnTooltipSetQuestLogItem(self, itemType, index)
local link = GetQuestLogItemLink(itemType, index)
AddItemComparison(self, link)
end

-- hook all tooltips that interest us
for _, tooltip in pairs({GameTooltip, ItemRefTooltip, ShoppingTooltip1, ShoppingTooltip2}) do
tooltip:HookScript('OnTooltipSetItem', OnTooltipSetItem)
hooksecurefunc(tooltip, 'SetQuestLogItem', OnTooltipSetQuestItem)
hooksecurefunc(tooltip, 'SetQuestLogItem', OnTooltipSetQuestLogItem)
hooksecurefunc(tooltip, 'SetQuestItem', OnTooltipSetQuestItem)
end

0 comments on commit c17f16c

Please sign in to comment.