From 6edc3249dad926bea67446659f743082887d58e7 Mon Sep 17 00:00:00 2001 From: Crum Date: Thu, 15 Nov 2018 15:02:45 -0600 Subject: [PATCH] update bags --- ElvUI/Modules/Bags/Bags.lua | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/ElvUI/Modules/Bags/Bags.lua b/ElvUI/Modules/Bags/Bags.lua index 6a8fd4e..d94dee1 100644 --- a/ElvUI/Modules/Bags/Bags.lua +++ b/ElvUI/Modules/Bags/Bags.lua @@ -840,18 +840,21 @@ function B:FormatMoney(amount) end function B:GetGraysValue() - local value, itemLink, rarity, itype, stackCount, stackPrice, _ = 0 + local value, itemLink, rarity, itemPrice, itype, stackCount, stackPrice, _ = 0 for bag = 0, NUM_BAG_FRAMES do for slot = 1, GetContainerNumSlots(bag) do itemLink = GetContainerItemLink(bag, slot) if itemLink then _, _, rarity, _, _, itype = GetItemInfo(match(itemLink, "item:(%d+)")) - - stackCount = select(2, GetContainerItemInfo(bag, slot)) or 1 - stackPrice = LIP:GetSellValue(itemLink) * stackCount - if (rarity and rarity == 0) and (itype and itype ~= "Quest") and (stackPrice and stackPrice > 0) then - value = value + stackPrice + itemPrice = LIP:GetSellValue(itemLink) + print(itype) + if itemPrice then + stackCount = select(2, GetContainerItemInfo(bag, slot)) or 1 + stackPrice = itemPrice * stackCount + if (rarity and rarity == 0) and (itype and itype ~= "Quest") and (stackPrice and stackPrice > 0) then + value = value + stackPrice + end end end end @@ -1291,12 +1294,14 @@ end function B:OpenBags() self.BagFrame:Show() self.BagFrame:UpdateAllSlots() + PlaySound("igBackPackOpen") E:GetModule("Tooltip"):GameTooltip_SetDefaultAnchor(GameTooltip) end function B:CloseBags() self.BagFrame:Hide() + PlaySound("igBackPackClose") if self.BankFrame then self.BankFrame:Hide()