tbc loop change part 2
This commit is contained in:
@@ -152,8 +152,7 @@ end
|
||||
|
||||
function set_form(filter)
|
||||
clear_form()
|
||||
for i = 1, getn(filter.components) do
|
||||
local component = filter.components[i]
|
||||
for _, component in ipairs(filter.components) do
|
||||
if component[1] == 'blizzard' then
|
||||
blizzard_query[component[2]] = component[4]
|
||||
else
|
||||
@@ -199,7 +198,7 @@ function formatted_post_filter(components)
|
||||
local stack = temp-T
|
||||
local str = ''
|
||||
|
||||
for i = 1, getn(components) do
|
||||
for i, component in ipairs(components) do
|
||||
local component = components[i]
|
||||
if no_line_break then
|
||||
str = str .. ' '
|
||||
|
||||
@@ -541,8 +541,8 @@ favorite_searches_listing:SetColInfo{{name='Auto Buy', width=.07, align='CENTER'
|
||||
recent_searches_listing = listing.new(frame.saved.recent)
|
||||
recent_searches_listing:SetColInfo{{name='Recent Searches', width=1}}
|
||||
|
||||
for listing in temp-S(favorite_searches_listing, recent_searches_listing) do
|
||||
for k, v in handlers do
|
||||
for listing in pairs(temp-S(favorite_searches_listing, recent_searches_listing)) do
|
||||
for k, v in pairs(handlers) do
|
||||
listing:SetHandler(k, v)
|
||||
end
|
||||
end
|
||||
@@ -175,10 +175,10 @@ function start_real_time_scan(query, search, continuation)
|
||||
end,
|
||||
on_complete = function()
|
||||
local map = temp-T
|
||||
for _, record in search.records do
|
||||
for _, record in pairs(search.records) do
|
||||
map[record.sniping_signature] = record
|
||||
end
|
||||
for _, record in new_records do
|
||||
for _, record in pairs(new_records) do
|
||||
map[record.sniping_signature] = record
|
||||
end
|
||||
release(new_records)
|
||||
@@ -352,7 +352,7 @@ function M.execute(resume, real_time)
|
||||
if real_time then
|
||||
start_real_time_scan(queries[1], nil, continuation)
|
||||
else
|
||||
for _, query in queries do
|
||||
for _, query in pairs(queries) do
|
||||
query.blizzard_query.first_page = current_search.first_page
|
||||
query.blizzard_query.last_page = current_search.last_page
|
||||
end
|
||||
|
||||
@@ -84,7 +84,7 @@ handlers = {
|
||||
|
||||
function get_auto_buy_validator()
|
||||
local validators = T
|
||||
for _, search in favorite_searches do
|
||||
for _, search in pairs(favorite_searches) do
|
||||
if search.auto_buy then
|
||||
local queries, error = filter_util.queries(search.filter_string)
|
||||
if queries then
|
||||
|
||||
+3
-3
@@ -18,9 +18,9 @@ function M:complete_filter()
|
||||
local start_index, _, current_modifier = strfind(filter_string, '([^/;]*)$')
|
||||
current_modifier = current_modifier or ''
|
||||
|
||||
for i = 1, getn(suggestions) do
|
||||
if strsub(strupper(suggestions[i]), 1, strlen(current_modifier)) == strupper(current_modifier) then
|
||||
this:SetText(strlower(strsub(filter_string, 1, start_index - 1) .. suggestions[i]))
|
||||
for _, suggestion in ipairs(suggestions) do
|
||||
if strsub(strupper(suggestion), 1, strlen(current_modifier)) == strupper(current_modifier) then
|
||||
this:SetText(strlower(strsub(filter_string, 1, start_index - 1) .. suggestion))
|
||||
this:HighlightText(strlen(filter_string), -1)
|
||||
return
|
||||
end
|
||||
|
||||
+4
-5
@@ -185,7 +185,7 @@ M.filters = {
|
||||
|
||||
function operator(str)
|
||||
local operator = str == 'not' and A('operator', 'not', 1)
|
||||
for name in temp-S('and', 'or') do
|
||||
for name in pairs(temp-S('and', 'or')) do
|
||||
local arity = select(3, strfind(str, '^' .. name .. '(%d*)$'))
|
||||
if arity then
|
||||
arity = tonumber(arity)
|
||||
@@ -214,12 +214,12 @@ do
|
||||
end
|
||||
end
|
||||
end
|
||||
for _, parser in temp-A(
|
||||
for _, parser in pairs(temp-A(
|
||||
temp-A('class', info.item_class_index),
|
||||
temp-A('subclass', vararg-function(arg) return info.item_subclass_index(index(self.class, 2) or 0, unpack(arg)) end),
|
||||
temp-A('slot', vararg-function(arg) return info.item_slot_index(index(self.class, 2) == 2 and 2 or 0, index(self.subclass, 2) or 0, unpack(arg)) end),
|
||||
temp-A('quality', info.item_quality_index)
|
||||
) do
|
||||
)) do
|
||||
if not self[parser[1]] then
|
||||
tinsert(parser, str)
|
||||
local index, label = parser[2](select(3, unpack(parser)))
|
||||
@@ -423,8 +423,7 @@ end
|
||||
|
||||
function prettified_filter_string(filter)
|
||||
local prettified = query_builder()
|
||||
for i = 1, getn(filter.components) do
|
||||
local component = filter.components[i]
|
||||
for i, component in ipairs(filter.components) do
|
||||
if component[1] == 'blizzard' then
|
||||
if component[2] == 'name' then
|
||||
if filter.blizzard.exact then
|
||||
|
||||
Reference in New Issue
Block a user