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,18 +840,21 @@ function B:FormatMoney(amount)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function B:GetGraysValue()
|
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 bag = 0, NUM_BAG_FRAMES do
|
||||||
for slot = 1, GetContainerNumSlots(bag) do
|
for slot = 1, GetContainerNumSlots(bag) do
|
||||||
itemLink = GetContainerItemLink(bag, slot)
|
itemLink = GetContainerItemLink(bag, slot)
|
||||||
if itemLink then
|
if itemLink then
|
||||||
_, _, rarity, _, _, itype = GetItemInfo(match(itemLink, "item:(%d+)"))
|
_, _, rarity, _, _, itype = GetItemInfo(match(itemLink, "item:(%d+)"))
|
||||||
|
itemPrice = LIP:GetSellValue(itemLink)
|
||||||
stackCount = select(2, GetContainerItemInfo(bag, slot)) or 1
|
print(itype)
|
||||||
stackPrice = LIP:GetSellValue(itemLink) * stackCount
|
if itemPrice then
|
||||||
if (rarity and rarity == 0) and (itype and itype ~= "Quest") and (stackPrice and stackPrice > 0) then
|
stackCount = select(2, GetContainerItemInfo(bag, slot)) or 1
|
||||||
value = value + stackPrice
|
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
|
||||||
end
|
end
|
||||||
@@ -1291,12 +1294,14 @@ end
|
|||||||
function B:OpenBags()
|
function B:OpenBags()
|
||||||
self.BagFrame:Show()
|
self.BagFrame:Show()
|
||||||
self.BagFrame:UpdateAllSlots()
|
self.BagFrame:UpdateAllSlots()
|
||||||
|
PlaySound("igBackPackOpen")
|
||||||
|
|
||||||
E:GetModule("Tooltip"):GameTooltip_SetDefaultAnchor(GameTooltip)
|
E:GetModule("Tooltip"):GameTooltip_SetDefaultAnchor(GameTooltip)
|
||||||
end
|
end
|
||||||
|
|
||||||
function B:CloseBags()
|
function B:CloseBags()
|
||||||
self.BagFrame:Hide()
|
self.BagFrame:Hide()
|
||||||
|
PlaySound("igBackPackClose")
|
||||||
|
|
||||||
if self.BankFrame then
|
if self.BankFrame then
|
||||||
self.BankFrame:Hide()
|
self.BankFrame:Hide()
|
||||||
|
|||||||
Reference in New Issue
Block a user