refactoring

This commit is contained in:
Manuel Simon Hirsig
2016-08-29 20:57:05 +02:00
parent 934d099365
commit 12bf048606
4 changed files with 6 additions and 10 deletions
+1 -5
View File
@@ -181,8 +181,7 @@ function scan_wdb(item_id)
end
if item_id <= MAX_ITEM_ID then
local t0 = GetTime()
thread(when, function() return GetTime() - t0 > .1 end, scan_wdb, item_id)
thread(wait, 10, scan_wdb, item_id)
else
sort(_G.aux_auctionable_items, function(a, b) return strlen(a) < strlen(b) or (strlen(a) == strlen(b) and a < b) end)
end
@@ -190,16 +189,13 @@ end
function public.populate_wdb(item_id)
item_id = item_id or MIN_ITEM_ID
if item_id > MAX_ITEM_ID then
log 'Cache populated.'
return
end
if not GetItemInfo('item:'..item_id) then
log('Fetching item '..item_id..'.')
AuxTooltip:SetHyperlink('item:'..item_id)
end
thread(populate_wdb, item_id + 1)
end