refactoring

This commit is contained in:
Manuel Simon Hirsig
2016-08-29 23:10:14 +02:00
parent a9c565257a
commit ecfafb71b1
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -273,7 +273,7 @@ function UseContainerItem(...) temp=arg
if modified or not index(active_tab, 'USE_ITEM') then
return orig.UseContainerItem(unpack(arg))
end
for item_info in present(info.container_item(arg[1], arg[2])) do
for item_info in present(aux.info.container_item(arg[1], arg[2])) do
return active_tab.USE_ITEM(item_info)
end
end
+1 -1
View File
@@ -134,7 +134,7 @@ function get_filter_builder_query()
add(strlower(_G['ITEM_QUALITY'..quality..'_DESC']))
end
local post_filter_string = filter_util.filter_string(temp-T('blizzard', tt, 'post', post_filter))
local post_filter_string = filter_util.filter_string(post_filter)
add(post_filter_string ~= '' and post_filter_string)
return filter_string or ''
+2 -2
View File
@@ -418,10 +418,10 @@ function suggestions(filter)
return suggestions
end
function public.filter_string(filter)
function public.filter_string(components)
local query_builder = query_builder()
for _, component in filter.components do
for _, component in components do
if component[1] == 'blizzard' then
query_builder.append(filter[4] or filter[3])
elseif component[1] == 'operator' then