mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-25 21:40:49 +00:00
unusable: remove useless bankslot iteration
This commit is contained in:
+1
-12
@@ -62,7 +62,7 @@ pfUI:RegisterModule("unusable", function ()
|
|||||||
|
|
||||||
self.tooltip:SetOwner(UIParent, "ANCHOR_NONE")
|
self.tooltip:SetOwner(UIParent, "ANCHOR_NONE")
|
||||||
if bag == -1 then
|
if bag == -1 then
|
||||||
self.tooltip:SetInventoryItem("player", self:GetBankFrameSlot(slot))
|
self.tooltip:SetInventoryItem("player", slot + 39)
|
||||||
elseif bag == "MailBox" then
|
elseif bag == "MailBox" then
|
||||||
self.tooltip:SetInboxItem(slot)
|
self.tooltip:SetInboxItem(slot)
|
||||||
elseif bag == "Merchant" then
|
elseif bag == "Merchant" then
|
||||||
@@ -182,15 +182,4 @@ pfUI:RegisterModule("unusable", function ()
|
|||||||
end
|
end
|
||||||
return id, name
|
return id, name
|
||||||
end
|
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)
|
end)
|
||||||
|
|||||||
Reference in New Issue
Block a user