big refactoring
This commit is contained in:
@@ -41,7 +41,7 @@ do
|
||||
end
|
||||
|
||||
function m.LOAD()
|
||||
armor = set(
|
||||
armor = hashset(
|
||||
'INVTYPE_HEAD',
|
||||
'INVTYPE_NECK',
|
||||
'INVTYPE_SHOULDER',
|
||||
@@ -59,7 +59,7 @@ function m.LOAD()
|
||||
'INVTYPE_HOLDABLE'
|
||||
)
|
||||
|
||||
weapon = set(
|
||||
weapon = hashset(
|
||||
'INVTYPE_2HWEAPON' ,
|
||||
'INVTYPE_WEAPONMAINHAND',
|
||||
'INVTYPE_WEAPON',
|
||||
|
||||
+3
-3
@@ -9,7 +9,7 @@ do
|
||||
for _, old_state in {scan_states[params.type]} do
|
||||
abort(old_state.id)
|
||||
end
|
||||
local thread_id = aux.control.thread(aux.C(wait_for_callback, params.on_scan_start, scan))
|
||||
local thread_id = aux.control.thread(L(wait_for_callback, params.on_scan_start, scan))
|
||||
scan_states[params.type] = {
|
||||
id = thread_id,
|
||||
params = params,
|
||||
@@ -156,8 +156,8 @@ function scan_page(i)
|
||||
if call(state.params.auto_buy_validator, auction_info) then
|
||||
local send_signal, signal_received = signal()
|
||||
aux.control.when(signal_received, recurse)
|
||||
aux.place_bid(auction_info.query_type, auction_info.index, auction_info.buyout_price, aux.C(send_signal, true))
|
||||
return aux.control.thread(aux.control.when, later(GetTime(), 10), aux.C(send_signal, false))
|
||||
aux.place_bid(auction_info.query_type, auction_info.index, auction_info.buyout_price, L(send_signal, true))
|
||||
return aux.control.thread(aux.control.when, later(GetTime(), 10), L(send_signal, false))
|
||||
elseif not query.validator or query.validator(auction_info) then
|
||||
return wait_for_callback(state.params.on_auction, auction_info, function(removed)
|
||||
if removed then
|
||||
|
||||
@@ -73,7 +73,7 @@ function SlashCmdList.AUX(command)
|
||||
elseif arguments[1] == 'chars' then
|
||||
local realm = GetCVar 'realmName'
|
||||
local chars = {}
|
||||
for name, _ in g.aux_characters[realm] or {} do
|
||||
for name in g.aux_characters[realm] or {} do
|
||||
tinsert(chars, name)
|
||||
end
|
||||
if getn(chars) > 0 then
|
||||
|
||||
Reference in New Issue
Block a user