Scrap uses incorrect item hyperlink causing incorrect result in Search:IsUncollected()
k3ypresser opened this issue ยท 1 comments
Hyperlink provided by GetItemInfo(id)[1] is a link for the normal version of an item. Whenever Scrap encounters items of a different version (e.g. mythic) it still tests the normal version for transmog appearance collection causing the addon not selling items properly. The following changes provide desired behavior.
local _, link, quality, level,_,_,_,_, slot, _, value, class, subclass, bound = C.Item.GetItemInfo(id)
local level = location and C.Item.GetCurrentItemLevel(location) or level or 0
+ local bagId, bagSlotId = ...
+ link = C_Container.GetContainerItemLink(bagId, bagSlotId) or linkI'm not creating a proper PR since I'm not confident enough on where to better apply the fix.
Line 147 in f13f889
As ... may not include any bag or slot, You should make use of the location variable and use location:GetBagAndSlot().
Or better use, use a different method that accepts the location variable. Add this line right after the GetItemInfo line:
local link = location and C.Item.GetItemLink(location) or linkThis has been working fine for me. I could make a pull request, but my past PRs have either been denied, or i did something wrong, and feel like an idiot.