refactoring

This commit is contained in:
Manuel Simon Hirsig
2016-09-04 21:21:47 +02:00
parent e888efcf2a
commit 867505c1a8
23 changed files with 172 additions and 173 deletions
+5 -5
View File
@@ -88,7 +88,7 @@ function public.item_info(item_id)
local cached_data = persistence.read(items_schema, data_string)
return T(
'name', cached_data.name,
'itemstring', 'item:'..item_id..':0:0:0',
'itemstring', 'item:' .. item_id .. ':0:0:0',
'quality', cached_data.quality,
'level', cached_data.level,
'class', cached_data.class,
@@ -157,7 +157,7 @@ function scan_wdb(item_id)
local processed = 0
while processed <= 100 and item_id <= MAX_ITEM_ID do
local itemstring = 'item:'..item_id
local itemstring = 'item:' .. item_id
local name, _, quality, level, class, subclass, max_stack, slot, texture = GetItemInfo(itemstring)
if name and not _G.aux_item_ids[strlower(name)] then
_G.aux_item_ids[strlower(name)] = item_id
@@ -193,9 +193,9 @@ function public.populate_wdb(item_id)
print 'Cache populated.'
return
end
if not GetItemInfo('item:'..item_id) then
print('Fetching item '..item_id..'.')
AuxTooltip:SetHyperlink('item:'..item_id)
if not GetItemInfo('item:' .. item_id) then
print('Fetching item ' .. item_id .. '.')
AuxTooltip:SetHyperlink('item:' .. item_id)
end
thread(populate_wdb, item_id + 1)
end