From 79072ec75dbee3fd067238adac407f154e463b10 Mon Sep 17 00:00:00 2001 From: shagu Date: Fri, 15 Jun 2018 20:57:38 +0200 Subject: [PATCH] unusable: remove useless bankslot iteration --- modules/unusable.lua | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/modules/unusable.lua b/modules/unusable.lua index 86394eec..7f067566 100644 --- a/modules/unusable.lua +++ b/modules/unusable.lua @@ -62,7 +62,7 @@ pfUI:RegisterModule("unusable", function () self.tooltip:SetOwner(UIParent, "ANCHOR_NONE") if bag == -1 then - self.tooltip:SetInventoryItem("player", self:GetBankFrameSlot(slot)) + self.tooltip:SetInventoryItem("player", slot + 39) elseif bag == "MailBox" then self.tooltip:SetInboxItem(slot) elseif bag == "Merchant" then @@ -182,15 +182,4 @@ pfUI:RegisterModule("unusable", function () end return id, name end - - function pfUI.unusable:GetBankFrameSlot(slot) - for i = 1, NUM_BANKGENERIC_SLOTS, 1 do - local bankSlot = _G["BankFrameItem" .. i] - if bankSlot:GetID() == slot then - return i + 39 - end - end - return nil - end - end)