From 1c5efd109a90a49bc6c2c9f6d8f50c73da773319 Mon Sep 17 00:00:00 2001 From: shagu Date: Fri, 11 Apr 2025 16:22:32 +0200 Subject: [PATCH] bags: only updae item lock on actual changes --- modules/bags.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/bags.lua b/modules/bags.lua index 9c5262c8..efe8facc 100644 --- a/modules/bags.lua +++ b/modules/bags.lua @@ -687,8 +687,11 @@ pfUI:RegisterModule("bags", "vanilla:tbc", function () for slot=1, bagsize do if pfUI.bags[bag] and pfUI.bags[bag].slots[slot] and pfUI.bags[bag].slots[slot].frame:IsShown() then local _, _, locked, _ = GetContainerItemInfo(bag, slot) - SetItemButtonDesaturated(pfUI.bags[bag].slots[slot].frame, locked, 0.5, 0.5, 0.5) - if pfUI.unusable then pfUI.unusable:UpdateSlot(bag, slot) end + if pfUI.bags[bag].slots[slot].locked ~= locked then + SetItemButtonDesaturated(pfUI.bags[bag].slots[slot].frame, locked, 0.5, 0.5, 0.5) + if pfUI.unusable then pfUI.unusable:UpdateSlot(bag, slot) end + pfUI.bags[bag].slots[slot].locked = locked + end end end end