From 28d456e5f34ca76b1c872f9b3a0f51e809216597 Mon Sep 17 00:00:00 2001 From: Manuel Simon Hirsig Date: Fri, 12 Feb 2016 01:38:44 +0100 Subject: [PATCH] extended search signature, added green price indicator for your high bids in search, working on changing the day interval implementation in history --- auction_listing.lua | 4 ++-- history.lua | 8 ++++++++ info.lua | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/auction_listing.lua b/auction_listing.lua index 8784a30..2c956ce 100644 --- a/auction_listing.lua +++ b/auction_listing.lua @@ -182,9 +182,9 @@ local methods = { -- GetRowPrices = function(record, isPerUnit) return end, -- TODO GetRowPrices = function(record, per_unit) if per_unit then - return ceil(record.unit_bid_price), ceil(record.unit_buyout_price) + return ceil(record.unit_bid_price), ceil(record.unit_buyout_price), record.high_bidder and '|cff16ff16' else - return record.bid_price, record.buyout_price + return record.bid_price, record.buyout_price, record.high_bidder and '|cff16ff16' end end, diff --git a/history.lua b/history.lua index a8d8d02..4675fe1 100644 --- a/history.lua +++ b/history.lua @@ -3,6 +3,14 @@ Aux.history = public private.PUSH_INTERVAL = 57600 +function private.hours_left_in_day() + return 24 - tonumber(date('%H')) +end + +function private.time_until_next_push() + return time() + private.hours_left_in_day * 3600 +end + function private.new_record() return { next_push = time() + private.PUSH_INTERVAL, market_values = {} } end diff --git a/info.lua b/info.lua index 01013ee..4a712ca 100644 --- a/info.lua +++ b/info.lua @@ -130,7 +130,7 @@ function public.auction(index, type) hyperlink = hyperlink, itemstring = item_info.itemstring, item_key = item_id..':'..suffix_id, - search_signature = Aux.util.join({item_id, suffix_id, enchant_id, start_price, buyout_price, bid_price, aux_quantity, duration, owner or ''}, ':'), + search_signature = Aux.util.join({item_id, suffix_id, enchant_id, start_price, buyout_price, bid_price, aux_quantity, duration, high_bidder and 1 or 0, owner or '?'}, ':'), name = name, texture = texture,