Skip to content

Commit

Permalink
[Retail][src\filters\EquipmentSet] Add workaround for GetContainerIte…
Browse files Browse the repository at this point in the history
…mEquipmentSetInfo
  • Loading branch information
doadin committed Nov 19, 2022
1 parent 6075104 commit 5a13827
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/filters/EquipmentSet.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,23 @@ local function Matches(bag, slot, rule)

-- Item belongs to a set?
local inset, setstring = GetContainerItemEquipmentSetInfo(bag, slot)
if not inset then
for _, id in next, GetEquipmentSetIDs() do
local name, iconFileID, setID, isEquipped, numItems, numEquipped, numInInventory, numLost, numIgnored = C_EquipmentSet.GetEquipmentSetInfo(id)
local items = C_EquipmentSet.GetItemIDs(id)
for i = 1, 19 do
if items[i] then
local setitemid = items[i]
local containerInfo = C_Container.GetContainerItemInfo(bag, slot)
if name and containerInfo and setitemid == containerInfo.itemID then
inset = true
setstring = name
end
end
end
end
end

if not inset then
return false
end
Expand Down

0 comments on commit 5a13827

Please sign in to comment.