From 6a0289877192de4cae62e087061e60b1fd556a8e Mon Sep 17 00:00:00 2001 From: Manuel Simon Hirsig Date: Fri, 25 Mar 2016 15:57:17 +0100 Subject: [PATCH] unit price fix --- auction_listing.lua | 24 ++++++++++++------------ core.lua | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/auction_listing.lua b/auction_listing.lua index 4b891c1..822f348 100644 --- a/auction_listing.lua +++ b/auction_listing.lua @@ -159,7 +159,7 @@ public.search_config = { end local price if record.high_bidder then - price = aux_price_per_unit and ceil(record.unit_high_bid) or record.high_bid + price = aux_price_per_unit and ceil(record.high_bid / record.aux_quantity) or record.high_bid else price = aux_price_per_unit and ceil(record.unit_bid_price) or record.bid_price end @@ -168,13 +168,13 @@ public.search_config = { cmp = function(record_a, record_b, desc) local price_a if record_a.high_bidder then - price_a = aux_price_per_unit and record_a.unit_high_bid or record_a.high_bid + price_a = aux_price_per_unit and record_a.high_bid / record_a.aux_quantity or record_a.high_bid else price_a = aux_price_per_unit and record_a.unit_bid_price or record_a.bid_price end local price_b if record_b.high_bidder then - price_b = aux_price_per_unit and record_b.unit_high_bid or record_b.high_bid + price_b = aux_price_per_unit and record_b.high_bid / record_b.aux_quantity or record_b.high_bid else price_b = aux_price_per_unit and record_b.unit_bid_price or record_b.bid_price end @@ -299,24 +299,24 @@ public.auctions_config = { set = function(cell, record) local price if record.high_bidder then - price = aux_price_per_unit and ceil(record.unit_high_bid) or record.high_bid + price = aux_price_per_unit and ceil(record.high_bid / record.aux_quantity) or record.high_bid else - price = aux_price_per_unit and ceil(record.unit_start_price) or record.start_price + price = aux_price_per_unit and ceil(record.start_price / record.aux_quantity) or record.start_price end cell:SetText(Aux.money.to_string(price, true, false)) end, cmp = function(record_a, record_b, desc) local price_a if record_a.high_bidder then - price_a = aux_price_per_unit and record_a.unit_high_bid or record_a.high_bid + price_a = aux_price_per_unit and record_a.high_bid / record_a.aux_quantity or record_a.high_bid else - price_a = aux_price_per_unit and record_a.unit_start_price or record_a.start_price + price_a = aux_price_per_unit and record_a.start_price / record_b.aux_quantity or record_a.start_price end local price_b if record_b.high_bidder then - price_b = aux_price_per_unit and record_b.unit_high_bid or record_b.high_bid + price_b = aux_price_per_unit and record_b.high_bid / record_b.aux_quantity or record_b.high_bid else - price_b = aux_price_per_unit and record_b.unit_start_price or record_b.start_price + price_b = aux_price_per_unit and record_b.start_price / record_b.aux_quantity or record_b.start_price end return Aux.sort.compare(price_a, price_b, desc) end, @@ -452,7 +452,7 @@ public.bids_config = { set = function(cell, record) local price if record.high_bidder then - price = aux_price_per_unit and ceil(record.unit_high_bid) or record.high_bid + price = aux_price_per_unit and ceil(record.high_bid / record.aux_quantity) or record.high_bid else price = aux_price_per_unit and ceil(record.unit_bid_price) or record.bid_price end @@ -461,13 +461,13 @@ public.bids_config = { cmp = function(record_a, record_b, desc) local price_a if record_a.high_bidder then - price_a = aux_price_per_unit and record_a.unit_high_bid or record_a.high_bid + price_a = aux_price_per_unit and record_a.high_bid / record_a.aux_quantity or record_a.high_bid else price_a = aux_price_per_unit and record_a.unit_bid_price or record_a.bid_price end local price_b if record_b.high_bidder then - price_b = aux_price_per_unit and record_b.unit_high_bid or record_b.high_bid + price_b = aux_price_per_unit and record_b.high_bid / record_b.aux_quantity or record_b.high_bid else price_b = aux_price_per_unit and record_b.unit_bid_price or record_b.bid_price end diff --git a/core.lua b/core.lua index 3fdaa18..deab7f1 100644 --- a/core.lua +++ b/core.lua @@ -1,5 +1,5 @@ Aux = { - version = '2.10.0', + version = '2.10.1', blizzard_ui_shown = false, orig = {}, }