fix inventory qty and showing equipped gear

Leandro Silva [02-02-20 - 14:55]
fix inventory qty and showing equipped gear
Filename
LeoAltholic.lua
LeoAltholic.txt
LeoAltholicInit.lua
LeoAltholicUI.lua
diff --git a/LeoAltholic.lua b/LeoAltholic.lua
index 28affbf..0431e96 100644
--- a/LeoAltholic.lua
+++ b/LeoAltholic.lua
@@ -665,7 +665,7 @@ function LeoAltholic.GetItems(char, bagId)
     local itemLines =  {}
     local i = 1
     local list
-    if char ~= nil and bagId == BAG_BACKPACK then
+    if char ~= nil and bagId >= 0 then
         list = char.inventory[bagId]
     else
         list = {}
diff --git a/LeoAltholic.txt b/LeoAltholic.txt
index 794750b..1529254 100644
--- a/LeoAltholic.txt
+++ b/LeoAltholic.txt
@@ -1,7 +1,7 @@
 ## Title: Leo's Altholic
 ## APIVersion: 100029 100030
-## Version: 1.7.0
-## AddOnVersion: 170
+## Version: 1.7.1
+## AddOnVersion: 171
 ## Author: |c39B027@LeandroSilva|r
 ## SavedVariables: LeoAltholicSavedVariables LeoAltholicCharVariables
 ## DependsOn: LibStub LibFeedback LibAddonMenu-2.0
diff --git a/LeoAltholicInit.lua b/LeoAltholicInit.lua
index 3f99f1d..94dac25 100644
--- a/LeoAltholicInit.lua
+++ b/LeoAltholicInit.lua
@@ -6,7 +6,7 @@ LeoAltholicToolbarUI = LeoAltholicToolbarUI or {}

 LeoAltholic.name = "LeoAltholic"
 LeoAltholic.displayName = "Leo's Altholic"
-LeoAltholic.version = "1.6.9"
+LeoAltholic.version = "1.7.1"
 LeoAltholic.chatPrefix = "|c39B027" .. LeoAltholic.name .. "|r: "

 LeoAltholic.TAB_BIO = "Bio"
diff --git a/LeoAltholicUI.lua b/LeoAltholicUI.lua
index 09b54a2..cd8a793 100644
--- a/LeoAltholicUI.lua
+++ b/LeoAltholicUI.lua
@@ -70,6 +70,9 @@ function LeoAltholic.ShowInventoryUI(charName, bagId)
             local qty = row:GetNamedChild("Qty")
             qty:SetText(item.count)
             qty:SetHidden(false)
+        else
+            qty:SetText(0)
+            qty:SetHidden(true)
         end
         label:SetText(item.link)
         label:SetHandler("OnMouseEnter",