From 7d4df3d7e0c6b1ab3e646144989ca186f59f8237 Mon Sep 17 00:00:00 2001 From: Sluimerstand Date: Tue, 11 Jun 2024 20:36:18 +0200 Subject: [PATCH] Fix to filter reasons after performance changes --- Core.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Core.lua b/Core.lua index 0ab91c2..bcb3c1d 100644 --- a/Core.lua +++ b/Core.lua @@ -1077,9 +1077,9 @@ end ------------------- -- Add to filtered loot and update the window -function app.AddFilteredLoot(itemLink, itemID, itemTexture, playerName, itemType) +function app.AddFilteredLoot(itemLink, itemID, itemTexture, playerName, itemType, filterReason) -- Add to filtered loot and update the window - app.FilteredLoot[#app.FilteredLoot+1] = { item = itemLink, itemID = itemID, icon = itemTexture, player = playerName, playerShort = "Unusable appearance", color = "ffFFFFFF", itemType = itemType } + app.FilteredLoot[#app.FilteredLoot+1] = { item = itemLink, itemID = itemID, icon = itemTexture, player = playerName, playerShort = filterReason, color = "ffFFFFFF", itemType = itemType } -- Check if the table exceeds 100 entries if #app.FilteredLoot > 100 then @@ -1227,17 +1227,17 @@ function event:CHAT_MSG_LOOT(text, playerName, languageName, channelName, player end) elseif C_Item.IsEquippableItem(itemLink) == true then -- Add to filtered loot and update the window - app.AddFilteredLoot(itemLink, itemID, itemTexture, playerName, itemType) + app.AddFilteredLoot(itemLink, itemID, itemTexture, playerName, itemType, "Unusable transmog") end elseif C_Item.IsEquippableItem(itemLink) == true then -- Add to filtered loot and update the window - app.AddFilteredLoot(itemLink, itemID, itemTexture, playerName, itemType) + app.AddFilteredLoot(itemLink, itemID, itemTexture, playerName, itemType, "Rarity too low") end elseif C_Item.IsEquippableItem(itemLink) == true then -- Ignore necks, rings, trinkets (as they never have a learnable appearance) if itemType ~= app.Type["General"] or (itemType == app.Type["General"] and itemEquipLoc ~= "INVTYPE_FINGER" and itemEquipLoc ~= "INVTYPE_TRINKET" and itemEquipLoc ~= "INVTYPE_NECK") then -- Add to filtered loot and update the window - app.AddFilteredLoot(itemLink, itemID, itemTexture, playerName, itemType) + app.AddFilteredLoot(itemLink, itemID, itemTexture, playerName, itemType, "Known appearance") end end else