mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 08:24:44 +00:00
update bags
This commit is contained in:
@@ -840,22 +840,25 @@ 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+)"))
|
||||
|
||||
itemPrice = LIP:GetSellValue(itemLink)
|
||||
print(itype)
|
||||
if itemPrice then
|
||||
stackCount = select(2, GetContainerItemInfo(bag, slot)) or 1
|
||||
stackPrice = LIP:GetSellValue(itemLink) * stackCount
|
||||
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
|
||||
end
|
||||
|
||||
return value
|
||||
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()
|
||||
|
||||
Reference in New Issue
Block a user