From 2aad5c47c95f59773679e463ecdd25943a6d26cc Mon Sep 17 00:00:00 2001 From: Lag Date: Sun, 22 Aug 2021 17:43:00 +0200 Subject: [PATCH] #166 fix bug with Cloak filter --- AtlasLootClassic/Data/ClassFilter.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/AtlasLootClassic/Data/ClassFilter.lua b/AtlasLootClassic/Data/ClassFilter.lua index 9f1efaad..0fd95816 100644 --- a/AtlasLootClassic/Data/ClassFilter.lua +++ b/AtlasLootClassic/Data/ClassFilter.lua @@ -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 @@ -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