panel: add option to only count on regular bags

This commit is contained in:
shagu
2017-09-24 20:38:40 +02:00
parent bf514590af
commit c01ff76e7c
3 changed files with 10 additions and 6 deletions
+8 -6
View File
@@ -245,12 +245,14 @@ pfUI:RegisterModule("panel", function ()
local usedslots = 0
for bag = 0,4 do
local bagsize = GetContainerNumSlots(bag)
maxslots = maxslots + bagsize
for j = 1,bagsize do
link = GetContainerItemLink(bag,j)
if link then
usedslots = usedslots + 1
if C.panel.bag.ignorespecial ~= "1" or GetBagFamily(bag) == "BAG" then
local bagsize = GetContainerNumSlots(bag)
maxslots = maxslots + bagsize
for j = 1,bagsize do
link = GetContainerItemLink(bag,j)
if link then
usedslots = usedslots + 1
end
end
end
end