Skip to content

Commit

Permalink
#166 fix bug with Cloak filter
Browse files Browse the repository at this point in the history
  • Loading branch information
Hoizame committed Aug 22, 2021
1 parent 301fab9 commit 2aad5c4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion AtlasLootClassic/Data/ClassFilter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,12 @@ AtlasLoot.AtlasLootDBDefaults.profile.ClassFilter = {
},
}

local ITEM_SUB_CLASS_IGNORE = {
[LE_ITEM_CLASS_ARMOR] = {
["INVTYPE_CLOAK"] = true,
}
}

local function OnInit()
db = AtlasLoot.db.ClassFilter
end
Expand Down Expand Up @@ -486,7 +492,9 @@ function ClassFilter.ClassCanUseItem(className, itemID)
return false
end

if CLASS_FILTER.itemSubClass[itemClassID][itemSubClassID] and not CLASS_FILTER.itemSubClass[itemClassID][itemSubClassID][classID] then
if ITEM_SUB_CLASS_IGNORE[itemClassID] and ITEM_SUB_CLASS_IGNORE[itemClassID][itemEquipLoc] then
-- ignore
elseif CLASS_FILTER.itemSubClass[itemClassID][itemSubClassID] and not CLASS_FILTER.itemSubClass[itemClassID][itemSubClassID][classID] then
return false
end

Expand Down

0 comments on commit 2aad5c4

Please sign in to comment.