From 8fd272d6771bb424296cbe179b6d6e9a4b02f1d0 Mon Sep 17 00:00:00 2001 From: shagu Date: Sat, 27 Apr 2019 15:27:52 +0200 Subject: [PATCH] bags: hardcode a limit of 6 bankslots Some servers have a hardcoded value of max-bankslot that exceed the maxiumum of available slots. Having a server return more purchased slots than available, leads to creation of non-existing bank slot frames that obviously return in errors. --- modules/bags.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/bags.lua b/modules/bags.lua index 9294ce3c..bb3edab7 100644 --- a/modules/bags.lua +++ b/modules/bags.lua @@ -441,7 +441,7 @@ pfUI:RegisterModule("bags", 20400, function () local position = "RIGHT" if frame == pfUI.bag.left then - min, max = 1, GetNumBankSlots() + min, max = 1, math.min(6, GetNumBankSlots()) tpl = "BankItemButtonBagTemplate" name, append = "pfUIBankBBag", "" position = "LEFT"