Skip to content

Commit 445ada2

Browse files
committed
Fix "#tier token" not matching soulbound tokens that match current character
1 parent f9972b6 commit 445ada2

File tree

1 file changed

+26
-3
lines changed

1 file changed

+26
-3
lines changed

Search/CheckItem.lua

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,29 @@ local function MyClassCheck(details)
348348
return false
349349
end
350350

351+
local function GetTooltipInfoLink(details)
352+
if details.tooltipInfoLink then
353+
return
354+
end
355+
356+
if not C_Item.IsItemDataCachedByID(details.itemID) then
357+
C_Item.RequestLoadItemDataByID(details.itemID)
358+
return
359+
end
360+
361+
local _, spellID = C_Item.GetItemSpell(details.itemID)
362+
if spellID and not C_Spell.IsSpellDataCached(spellID) then
363+
C_Spell.RequestLoadSpellData(spellID)
364+
return
365+
end
366+
367+
if Syndicator.Constants.IsRetail then
368+
details.tooltipInfoLink = C_TooltipInfo.GetHyperlink(details.itemLink) or {lines={}}
369+
else
370+
details.tooltipInfoLink = Syndicator.Utilities.DumpClassicTooltip(function(tooltip) tooltip:SetHyperlink(details.itemLink) end)
371+
end
372+
end
373+
351374
local function GetTooltipInfoSpell(details)
352375
if details.tooltipInfoSpell then
353376
return
@@ -705,10 +728,10 @@ local function TierTokenCheck(details)
705728
return false
706729
end
707730

708-
GetTooltipInfoSpell(details)
731+
GetTooltipInfoLink(details)
709732

710-
if details.tooltipInfoSpell then
711-
for _, row in ipairs(details.tooltipInfoSpell.lines) do
733+
if details.tooltipInfoLink then
734+
for _, row in ipairs(details.tooltipInfoLink.lines) do
712735
if row.leftText:match(classRestrictionsPattern) then
713736
return true
714737
end

0 commit comments

Comments
 (0)