extended the new bidding for to the bids tab

This commit is contained in:
Manuel Simon Hirsig
2016-06-03 13:38:48 +02:00
parent ce920c5fee
commit 80ffb04b44
4 changed files with 21 additions and 14 deletions
+4 -1
View File
@@ -148,7 +148,10 @@ do
if not record.high_bidder then
private.bid_button:SetScript('OnClick', function()
if private.test(record)(index) and private.listing:ContainsRecord(record) then
Aux.place_bid('bidder', index, record.bid_price, private.record_remover(record))
Aux.place_bid('bidder', index, record.bid_price, record.bid_price < record.buyout_price and function()
Aux.info.bid_update(record)
private.listing:SetDatabase()
end or private.record_remover(record))
end
end)
private.bid_button:Enable()
+1 -1
View File
@@ -1,5 +1,5 @@
Aux = {
version = '2.13.1',
version = '2.13.2',
blizzard_ui_shown = false,
orig = {},
}
+11
View File
@@ -171,6 +171,17 @@ function public.auction(index, query_type)
}
end
function public.bid_update(auction_record)
auction_record.high_bid = auction_record.bid_price
auction_record.blizzard_bid = auction_record.bid_price
auction_record.min_increment = Aux.min_bid_increment(auction_record.bid_price)
auction_record.bid_price = auction_record.bid_price + auction_record.min_increment
auction_record.unit_blizzard_bid = auction_record.blizzard_bid / auction_record.aux_quantity
auction_record.unit_bid_price = auction_record.bid_price / auction_record.aux_quantity
auction_record.high_bidder = 1
auction_record.search_signature = Aux.util.join({auction_record.item_id, auction_record.suffix_id, auction_record.enchant_id, auction_record.start_price, auction_record.buyout_price, auction_record.bid_price, auction_record.aux_quantity, auction_record.duration, 1, aux_ignore_owner and (Aux.is_player(auction_record.owner) and 0 or 1) or (auction_record.owner or '?')}, ':')
end
function public.set_tooltip(itemstring, owner, anchor)
GameTooltip:SetOwner(owner, anchor)
GameTooltip:SetHyperlink(itemstring)
+5 -12
View File
@@ -920,17 +920,7 @@ function private.record_remover(record)
end
function private.record_bid_updater(record)
return function()
record.high_bid = record.bid_price
record.blizzard_bid = record.bid_price
record.min_increment = Aux.min_bid_increment(record.bid_price)
record.bid_price = record.bid_price + record.min_increment
record.unit_blizzard_bid = record.blizzard_bid / record.aux_quantity
record.unit_bid_price = record.bid_price / record.aux_quantity
record.high_bidder = 1
record.search_signature = Aux.util.join({record.item_id, record.suffix_id, record.enchant_id, record.start_price, record.buyout_price, record.bid_price, record.aux_quantity, record.duration, 1, aux_ignore_owner and (Aux.is_player(record.owner) and 0 or 1) or (record.owner or '?')}, ':')
private.results_listing:SetDatabase()
end
return
end
do
@@ -963,7 +953,10 @@ do
if not record.high_bidder then
private.bid_button:SetScript('OnClick', function()
if private.test(record)(index) and private.results_listing:ContainsRecord(record) then
Aux.place_bid('list', index, record.bid_price, record.bid_price < record.buyout_price and private.record_bid_updater(record) or private.record_remover(record))
Aux.place_bid('list', index, record.bid_price, record.bid_price < record.buyout_price and function()
Aux.info.bid_update(record)
private.results_listing:SetDatabase()
end or private.record_remover(record))
end
end)
private.bid_button:Enable()