small bugfix

This commit is contained in:
Manuel Simon Hirsig
2015-09-08 02:35:04 +02:00
parent d596ba6bc2
commit cfd37254d6
+34 -38
View File
@@ -111,7 +111,6 @@ end
function submitQuery() function submitQuery()
if state == STATE_PREQUERY then if state == STATE_PREQUERY then
QueryAuctionItems( QueryAuctionItems(
currentQuery.name, currentQuery.name,
currentQuery.minLevel, currentQuery.minLevel,
@@ -132,52 +131,49 @@ end
function processQueryResults() function processQueryResults()
if state == STATE_POSTQUERY then -- SortAuctionItems("list", "buyout")
-- if IsAuctionSortReversed("list", "buyout") then
-- SortAuctionItems("list", "buyout") -- SortAuctionItems("list", "buyout")
-- if IsAuctionSortReversed("list", "buyout") then -- end
-- SortAuctionItems("list", "buyout")
-- end
local numBatchAuctions, totalAuctions = GetNumAuctionItems("list") local numBatchAuctions, totalAuctions = GetNumAuctionItems("list")
if totalAuctions >= NUM_AUCTION_ITEMS_PER_PAGE then if totalAuctions >= NUM_AUCTION_ITEMS_PER_PAGE then
Auctionator_SetMessage("Scanning auctions: page "..currentPage.." ...") Auctionator_SetMessage("Scanning auctions: page "..currentPage.." ...")
end end
for i = 1, numBatchAuctions do for i = 1, numBatchAuctions do
local name, texture, count, quality, canUse, level, minBid, minIncrement, buyoutPrice, bidAmount, highBidder, owner = GetAuctionItemInfo("list", i) local name, texture, count, quality, canUse, level, minBid, minIncrement, buyoutPrice, bidAmount, highBidder, owner = GetAuctionItemInfo("list", i)
local duration = GetAuctionItemTimeLeft("list", i) local duration = GetAuctionItemTimeLeft("list", i)
local scanDatum = { local scanDatum = {
name = name, name = name,
texture = texture, texture = texture,
stackSize = count, stackSize = count,
quality = quality, quality = quality,
canUse = canUse, canUse = canUse,
level = level, level = level,
minBid = minBid, minBid = minBid,
minIncrement = minIncrement, minIncrement = minIncrement,
buyoutPrice = buyoutPrice, buyoutPrice = buyoutPrice,
bidAmount = bidAmount, bidAmount = bidAmount,
highBidder = highBidder, highBidder = highBidder,
owner = owner, owner = owner,
duration = duration duration = duration
} }
if not currentQuery.exactMatch or (currentQuery.name == scanDatum.name and scanDatum.buyoutPrice > 0) then -- TODO separate option for buyout price if not currentQuery.exactMatch or (currentQuery.name == scanDatum.name and scanDatum.buyoutPrice > 0) then -- TODO separate option for buyout price
tinsert(scanData, scanDatum) tinsert(scanData, scanDatum)
if currentQuery.onReadDatum then if currentQuery.onReadDatum then
currentQuery.onReadDatum(scanDatum) currentQuery.onReadDatum(scanDatum)
end
end end
end end
end
if numBatchAuctions == NUM_AUCTION_ITEMS_PER_PAGE then if numBatchAuctions == NUM_AUCTION_ITEMS_PER_PAGE then
state = STATE_PREQUERY state = STATE_PREQUERY
else else
Auctionator_Scan_Complete() Auctionator_Scan_Complete()
end
end end
end end