From 5d807db0bf19bb73f767ce71b54b0ce215370d6c Mon Sep 17 00:00:00 2001 From: Manuel Simon Hirsig Date: Thu, 28 Jan 2016 13:59:18 +0100 Subject: [PATCH] post now correctly factors in stack size for market value based suggestions, also uses 1.2 instead of 1x the market value --- post_frame.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/post_frame.lua b/post_frame.lua index 2018fc2..c59894b 100644 --- a/post_frame.lua +++ b/post_frame.lua @@ -543,10 +543,11 @@ function private.update_recommendation() elseif existing_auctions[selected_item.key] then -- unsuccessful search - local market_value = Aux.history.market_value(selected_item.key) - if market_value then - private.start_price:SetText(Aux.money.to_string(max(1, market_value * 0.95))) - private.buyout_price:SetText(Aux.money.to_string(max(1, market_value))) + local price_suggestion = Aux.history.market_value(selected_item.key) and 1.2 * Aux.history.market_value(selected_item.key) * private.get_stack_size_slider_value() + + if price_suggestion then + private.start_price:SetText(Aux.money.to_string(max(1, price_suggestion * 0.95))) + private.buyout_price:SetText(Aux.money.to_string(max(1, price_suggestion))) else private.start_price:SetText(Aux.money.to_string(max(1, selected_item.unit_vendor_price * (selected_item.charges and 1 or private.get_stack_size_slider_value()) * 1.053))) private.buyout_price:SetText(Aux.money.to_string(max(1, selected_item.unit_vendor_price * (selected_item.charges and 1 or private.get_stack_size_slider_value()) * 4)))