small bugfix

This commit is contained in:
Manuel Simon Hirsig
2015-09-08 02:40:32 +02:00
parent cfd37254d6
commit e51eae0a8a
+27 -29
View File
@@ -1,8 +1,22 @@
local STATE_IDLE = 0
local STATE_PREQUERY = 1
local STATE_POSTQUERY = 2
local NUM_AUCTION_ITEMS_PER_PAGE = 50
local currentQuery
local currentPage
local state = STATE_IDLE
local scanData
local timeOfLastUpdate = GetTime() local timeOfLastUpdate = GetTime()
-- forward declaration of local functions -- forward declaration of local functions
local submitQuery, processQueryResults local submitQuery, processQueryResults
-----------------------------------------
local eventFrame = CreateFrame("Frame") local eventFrame = CreateFrame("Frame")
eventFrame:SetScript("OnUpdate", function() eventFrame:SetScript("OnUpdate", function()
if state == STATE_PREQUERY and GetTime() - timeOfLastUpdate > 0.5 then if state == STATE_PREQUERY and GetTime() - timeOfLastUpdate > 0.5 then
@@ -23,20 +37,6 @@ end)
----------------------------------------- -----------------------------------------
local STATE_IDLE = 0
local STATE_PREQUERY = 1
local STATE_POSTQUERY = 2
local NUM_AUCTION_ITEMS_PER_PAGE = 50
local currentQuery
local currentPage
local state = STATE_IDLE
local scanData
-----------------------------------------
function Auctionator_Scan_Idle() function Auctionator_Scan_Idle()
return state == STATE_IDLE return state == STATE_IDLE
end end
@@ -110,21 +110,19 @@ end
----------------------------------------- -----------------------------------------
function submitQuery() function submitQuery()
if state == STATE_PREQUERY then QueryAuctionItems(
QueryAuctionItems( currentQuery.name,
currentQuery.name, currentQuery.minLevel,
currentQuery.minLevel, currentQuery.maxLevel,
currentQuery.maxLevel, currentQuery.invTypeIndex,
currentQuery.invTypeIndex, currentQuery.classIndex,
currentQuery.classIndex, currentQuery.subclassIndex,
currentQuery.subclassIndex, currentPage,
currentPage, currentQuery.isUsable,
currentQuery.isUsable, currentQuery.qualityIndex
currentQuery.qualityIndex )
) state = STATE_POSTQUERY
state = STATE_POSTQUERY currentPage = currentPage + 1
currentPage = currentPage + 1
end
end end
----------------------------------------- -----------------------------------------