diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 0a96461..c172a44 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -4,7 +4,9 @@ - + + + @@ -70,8 +72,8 @@ - - + + @@ -87,11 +89,11 @@ - + - - + + @@ -110,18 +112,18 @@ - - + + - + - - + + @@ -182,14 +184,14 @@ @@ -435,14 +437,6 @@ - - - - - - - - @@ -475,14 +469,6 @@ - - - - - - - - @@ -491,14 +477,6 @@ - - - - - - - - @@ -507,10 +485,34 @@ + + + + + + + + - - + + + + + + + + + + + + + + + + + + diff --git a/buy.lua b/buy.lua index 5b06be6..b9d64b9 100644 --- a/buy.lua +++ b/buy.lua @@ -500,8 +500,8 @@ function update_sheet() local mode = UIDropDownMenu_GetSelectedValue(AuxBuyModeDropDown) if mode == BUYOUT then - local buyout_auctions = auctions and Aux.util.filter(auctions, function(auction) return auction.name ~= UnitName('player') and auction.buyout_price > 0 end) or {} - Aux.list.populate(AuxBuyBuyList.sheet, auctions and Aux.util.group_by(buyout_auctions, function(a1, a2) return a1.hyperlink == a2.hyperlink and a1.stack_size == a2.stack_size and a1.buyout_price = a2.buyout_price end) or {}) + local buyout_auctions = auctions and Aux.util.filter(auctions, function(auction) return auction.name ~= UnitName('player') and auction.buyout_price end) or {} + Aux.list.populate(AuxBuyBuyList.sheet, auctions and Aux.util.group_by(buyout_auctions, function(a1, a2) return a1.hyperlink == a2.hyperlink and a1.stack_size == a2.stack_size and a1.buyout_price == a2.buyout_price end) or {}) elseif mode == BID then local bid_auctions = auctions and Aux.util.filter(auctions, function(auction) return auction.name ~= UnitName('player') end) or {} Aux.list.populate(AuxBuyBidList.sheet, bid_auctions) diff --git a/core.lua b/core.lua index 64a9019..abaf756 100644 --- a/core.lua +++ b/core.lua @@ -284,7 +284,7 @@ function Aux_AuctionFrameTab_OnClick(index) AuxBuyPanel:Show() AuctionFrame:EnableMouse(false) - Aux_Buy_ScrollbarUpdate() + Aux.buy.on_open() else Aux.orig.AuctionFrameTab_OnClick(index) lastItemPosted = nil diff --git a/info.lua b/info.lua index f5372d1..7e7af5a 100644 --- a/info.lua +++ b/info.lua @@ -1,4 +1,4 @@ -local TOOLTIP_LENGTH +local TOOLTIP_LENGTH = 30 Aux.info = {} @@ -28,20 +28,21 @@ function Aux.info.container_item(bag, slot) end function Aux.info.auction_sell_item() - local name, texture, stack_size, quality, usable, vendor_price, vendor_price_per_unit, max_stack, total_count = GetAuctionSellItemInfo() - local deposit_factor = CalculateAuctionDeposit(120) / vendor_price - + local name, texture, stack_size, quality, usable, vendor_price = GetAuctionSellItemInfo() + if name then + + local deposit_factor = CalculateAuctionDeposit(120) / vendor_price + local vendor_price_per_unit = vendor_price / stack_size + auction_sell_item = { name = name, texture = texture, stack_size = stack_size, quality = quality, usable = usable, + vendor_price_per_unit = vendor_price_per_unit, vendor_price = vendor_price, - vendor_price_per_unit = vendor_price_per_unit, - max_stack = max_stack, -- TODO not working?? - total_count = total_count, deposit_factor = deposit_factor, } diff --git a/sell.lua b/sell.lua index f6988ec..94485ef 100644 --- a/sell.lua +++ b/sell.lua @@ -216,7 +216,7 @@ function update_recommendation() AuxSellRefreshButton:Enable() - MoneyFrame_Update("AuctionsDepositMoneyFrame", floor(current_auction.vendor_price_per_unit * current_auction.base_deposit * (current_auction.has_charges and 1 or get_stack_size_slider_value()) * AuxSellStackCountSlider:GetValue()) * AuctionFrameAuctions.duration / 120) + MoneyFrame_Update("AuctionsDepositMoneyFrame", floor(current_auction.vendor_price_per_unit * current_auction.deposit_factor * (current_auction.has_charges and 1 or get_stack_size_slider_value())) * AuxSellStackCountSlider:GetValue() * AuctionFrameAuctions.duration / 120) if auxSellEntries[current_auction.name] and auxSellEntries[current_auction.name].selected then if not auxSellEntries[current_auction.name].created or GetTime() - auxSellEntries[current_auction.name].created > 1800 then