From 4c739fe2cca2c122d9335bed1127975df524f85e Mon Sep 17 00:00:00 2001 From: shagu Date: Thu, 31 Dec 2020 12:52:23 +0100 Subject: [PATCH] bags: set alpha on all slots during search --- modules/bags.lua | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/modules/bags.lua b/modules/bags.lua index cedfcf40..eb112868 100644 --- a/modules/bags.lua +++ b/modules/bags.lua @@ -888,10 +888,7 @@ pfUI:RegisterModule("bags", "vanilla:tbc", function () local bagsize = GetContainerNumSlots(bag) if bag == -2 and pfUI.bag.showKeyring == true then bagsize = GetKeyRingSize() end for slot=1, bagsize do - local texture, itemCount, locked, quality, readable = GetContainerItemInfo(bag, slot) - if itemCount then - pfUI.bags[bag].slots[slot].frame:SetAlpha(1) - end + pfUI.bags[bag].slots[slot].frame:SetAlpha(1) end end end) @@ -902,14 +899,13 @@ pfUI:RegisterModule("bags", "vanilla:tbc", function () local bagsize = GetContainerNumSlots(bag) if bag == -2 and pfUI.bag.showKeyring == true then bagsize = GetKeyRingSize() end for slot=1, bagsize do + pfUI.bags[bag].slots[slot].frame:SetAlpha(.25) local texture, itemCount, locked, quality, readable = GetContainerItemInfo(bag, slot) if itemCount then local itemLink = GetContainerItemLink(bag, slot) local itemstring = string.sub(itemLink, string.find(itemLink, "%[")+1, string.find(itemLink, "%]")-1) if strfind(strlower(itemstring), strlower(string.gsub(this:GetText(), "([^%w])", "%%%1"))) then pfUI.bags[bag].slots[slot].frame:SetAlpha(1) - else - pfUI.bags[bag].slots[slot].frame:SetAlpha(.25) end end end