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
+1
View File
@@ -439,6 +439,7 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("panel", "other", "minimap", "zone")
pfUI:UpdateConfig("panel", "micro", "enable", "0")
pfUI:UpdateConfig("panel", "xp", "showalways", "0")
pfUI:UpdateConfig("panel", "bag", "ignorespecial", "1")
pfUI:UpdateConfig("castbar", "player", "hide_blizz", "1")
pfUI:UpdateConfig("castbar", "player", "hide_pfui", "0")
pfUI:UpdateConfig("castbar", "target", "hide_pfui", "0")
+1
View File
@@ -1427,6 +1427,7 @@ pfUI:RegisterModule("gui", function ()
CreateConfig(this, T["Right Panel: Right"], C.panel.right, "right", "dropdown", pfUI.gui.dropdowns.panel_values)
CreateConfig(this, T["Other Panel: Minimap"], C.panel.other, "minimap", "dropdown", pfUI.gui.dropdowns.panel_values)
CreateConfig(this, T["Always Show Experience And Reputation Bar"], C.panel.xp, "showalways", "checkbox")
CreateConfig(this, T["Only Count Bagspace On Regular Bags"], C.panel.bag, "ignorespecial", "checkbox")
CreateConfig(this, T["Enable Micro Bar"], C.panel.micro, "enable", "checkbox")
CreateConfig(this, T["Enable 24h Clock"], C.global, "twentyfour", "checkbox")
this.setup = true
+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