diff --git a/compat/tbc.lua b/compat/tbc.lua index aad0e207..2712acb4 100644 --- a/compat/tbc.lua +++ b/compat/tbc.lua @@ -26,7 +26,6 @@ COOLDOWN_FRAME_TYPE = "Cooldown" LOOT_BUTTON_FRAME_TYPE = "Button" PLAYER_BUFF_START_ID = 0 -MAX_BANK_SLOTS = 6 ACTIONBAR_SECURE_TEMPLATE_BAR = "SecureStateHeaderTemplate" ACTIONBAR_SECURE_TEMPLATE_BUTTON = "SecureActionButtonTemplate" diff --git a/compat/vanilla.lua b/compat/vanilla.lua index e2a52f0b..29fa640e 100644 --- a/compat/vanilla.lua +++ b/compat/vanilla.lua @@ -26,7 +26,6 @@ COOLDOWN_FRAME_TYPE = "Model" LOOT_BUTTON_FRAME_TYPE = "LootButton" PLAYER_BUFF_START_ID = -1 -MAX_BANK_SLOTS = 6 ACTIONBAR_SECURE_TEMPLATE_BAR = nil ACTIONBAR_SECURE_TEMPLATE_BUTTON = nil diff --git a/modules/bags.lua b/modules/bags.lua index 2a3d2775..6171b618 100644 --- a/modules/bags.lua +++ b/modules/bags.lua @@ -442,7 +442,7 @@ pfUI:RegisterModule("bags", "vanilla:tbc", function () local position = "RIGHT" if frame == pfUI.bag.left then - min, max = 1, math.min(MAX_BANK_SLOTS, (GetNumBankSlots() or 0)) + min, max = 1, math.min(NUM_BANKBAGSLOTS, (GetNumBankSlots() or 0)) tpl = "BankItemButtonBagTemplate" name, append = "pfUIBankBBag", "" position = "LEFT" @@ -452,14 +452,12 @@ pfUI:RegisterModule("bags", "vanilla:tbc", function () CreateBackdrop(frame.bagslots, default_border) CreateBackdropShadow(frame.bagslots) - local extra = 0 - if frame == pfUI.bag.left and GetNumBankSlots() < MAX_BANK_SLOTS then extra = 1 end + local extra = frame == pfUI.bag.left and GetNumBankSlots() < NUM_BANKBAGSLOTS and 1 or 0 local width = (frame.button_size/5*4 + default_border*2) * (max-min+1+extra) local height = default_border + (frame.button_size/5*4 + default_border) frame.bagslots:SetWidth(width) frame.bagslots:SetHeight(height) - for slot=min, max do if not frame.bagslots.slots[slot] then frame.bagslots.slots[slot] = {} @@ -516,7 +514,7 @@ pfUI:RegisterModule("bags", "vanilla:tbc", function () end if frame == pfUI.bag.left then - if GetNumBankSlots() < MAX_BANK_SLOTS then + if GetNumBankSlots() < NUM_BANKBAGSLOTS then if not frame.bagslots.buy then frame.bagslots.buy = CreateFrame("Button", "pfBagSlotBuy", frame.bagslots) end