From 48e4bc040f39ec9a8ac5a2dbf52126433857fd90 Mon Sep 17 00:00:00 2001 From: Manuel Simon Hirsig Date: Mon, 23 Nov 2015 04:30:13 +0100 Subject: [PATCH] price suggestion now based on vendor value when no auctions are found, fixed some minor UI bugs --- auctions_frame.lua | 2 +- bids_frame.lua | 2 +- core.xml | 6 +++++- post_frame.lua | 5 ++++- post_frame.xml | 4 ++-- 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/auctions_frame.lua b/auctions_frame.lua index 79a67e9..f5c10f7 100644 --- a/auctions_frame.lua +++ b/auctions_frame.lua @@ -148,7 +148,7 @@ function public.update_auction_records() private.create_auction_record(auction_info) end, on_complete = function() - Aux.log('Scan complete: '..getn(auction_records)..' auctions found') + Aux.log('Scan complete: '..getn(auction_records)..' '..Aux_PluralizeIf('auction', getn(auction_records))..' found') public.update_listing() end, on_abort = function() diff --git a/bids_frame.lua b/bids_frame.lua index 3987ad7..0ccd71c 100644 --- a/bids_frame.lua +++ b/bids_frame.lua @@ -169,7 +169,7 @@ function public.update_bid_records() private.create_bid_record(auction_info) end, on_complete = function() - Aux.log('Scan complete: '..getn(bid_records)..' bids found') + Aux.log('Scan complete: '..getn(bid_records)..' '..Aux_PluralizeIf('bid', getn(bid_records))..' found') public.update_listing() end, on_abort = function() diff --git a/core.xml b/core.xml index e252b3e..8349ba2 100644 --- a/core.xml +++ b/core.xml @@ -340,7 +340,11 @@ - + + + + + diff --git a/post_frame.lua b/post_frame.lua index 1915772..6400db6 100644 --- a/post_frame.lua +++ b/post_frame.lua @@ -397,9 +397,12 @@ function update_recommendation() -- local market_price = Aux.history.get_price_suggestion(current_auction.key, current_auction.aux_quantity) -- MoneyInputFrame_SetCopper(AuxSellParametersBuyoutPrice, Aux_Round(market_price * 0.95)) -- MoneyInputFrame_SetCopper(AuxSellParametersStartPrice, market_price) + elseif existing_auctions[current_auction.key] then + MoneyInputFrame_SetCopper(AuxSellParametersStartPrice, max(1, Aux_Round(current_auction.unit_vendor_price * (current_auction.charges and 1 or get_stack_size_slider_value()) * 1.5))) + MoneyInputFrame_SetCopper(AuxSellParametersBuyoutPrice, max(1, Aux_Round(current_auction.unit_vendor_price * (current_auction.charges and 1 or get_stack_size_slider_value()) * 2))) else - MoneyInputFrame_SetCopper(AuxSellParametersBuyoutPrice, 0) MoneyInputFrame_SetCopper(AuxSellParametersStartPrice, 0) + MoneyInputFrame_SetCopper(AuxSellParametersBuyoutPrice, 0) end end end diff --git a/post_frame.xml b/post_frame.xml index 8449a62..1ac2671 100644 --- a/post_frame.xml +++ b/post_frame.xml @@ -204,7 +204,7 @@ - + @@ -219,7 +219,7 @@ - +