refactorings
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
local m, public, private = Aux.tab(3, 'auctions_tab')
|
||||
local m, public, private = aux.tab(3, 'auctions_tab')
|
||||
|
||||
private.auction_records = nil
|
||||
|
||||
@@ -34,7 +34,7 @@ function public.scan_auctions()
|
||||
|
||||
m.auction_records = {}
|
||||
m.update_listing()
|
||||
Aux.scan.start{
|
||||
aux.scan.start{
|
||||
type = 'owner',
|
||||
queries = {{ blizzard_query = {} }},
|
||||
on_page_loaded = function(page, total_pages)
|
||||
@@ -58,7 +58,7 @@ end
|
||||
|
||||
function private.test(record)
|
||||
return function(index)
|
||||
local auction_info = Aux.info.auction(index, 'owner')
|
||||
local auction_info = aux.info.auction(index, 'owner')
|
||||
return auction_info and auction_info.search_signature == record.search_signature
|
||||
end
|
||||
end
|
||||
@@ -74,9 +74,9 @@ do
|
||||
return
|
||||
end
|
||||
|
||||
Aux.scan.abort(scan_id)
|
||||
aux.scan.abort(scan_id)
|
||||
state = SEARCHING
|
||||
scan_id = Aux.scan_util.find(
|
||||
scan_id = aux.scan_util.find(
|
||||
record,
|
||||
m.status_bar,
|
||||
function()
|
||||
@@ -92,7 +92,7 @@ do
|
||||
|
||||
m.cancel_button:SetScript('OnClick', function()
|
||||
if m.test(record)(index) and m.listing:ContainsRecord(record) then
|
||||
Aux.cancel_auction(index, Aux.f(m.listing.RemoveAuctionRecord, m.listing, record))
|
||||
aux.cancel_auction(index, aux.f(m.listing.RemoveAuctionRecord, m.listing, record))
|
||||
end
|
||||
end)
|
||||
m.cancel_button:Enable()
|
||||
@@ -116,7 +116,7 @@ do
|
||||
m.find_auction(selection.record)
|
||||
elseif state == FOUND and not m.test(selection.record)(found_index) then
|
||||
m.cancel_button:Disable()
|
||||
if not Aux.cancel_in_progress() then
|
||||
if not aux.cancel_in_progress() then
|
||||
state = IDLE
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
Aux.auctions_tab.FRAMES(function(m, public, private)
|
||||
aux.auctions_tab.FRAMES(function(m, public, private)
|
||||
private.frame = CreateFrame('Frame', nil, AuxFrame)
|
||||
m.frame:SetAllPoints()
|
||||
m.frame:SetScript('OnUpdate', m.on_update)
|
||||
m.frame:Hide()
|
||||
|
||||
m.frame.listing = Aux.gui.panel(m.frame)
|
||||
m.frame.listing = aux.gui.panel(m.frame)
|
||||
m.frame.listing:SetPoint('TOP', AuxFrame, 'TOP', 0, -8)
|
||||
m.frame.listing:SetPoint('BOTTOMLEFT', AuxFrameContent, 'BOTTOMLEFT', 0, 0)
|
||||
m.frame.listing:SetPoint('BOTTOMRIGHT', AuxFrameContent, 'BOTTOMRIGHT', 0, 0)
|
||||
|
||||
private.listing = Aux.auction_listing.CreateAuctionResultsTable(m.frame.listing, Aux.auction_listing.auctions_config)
|
||||
private.listing = aux.auction_listing.CreateAuctionResultsTable(m.frame.listing, aux.auction_listing.auctions_config)
|
||||
m.listing:SetSort(1,2,3,4,5,6,7,8)
|
||||
m.listing:Reset()
|
||||
m.listing:SetHandler('OnCellClick', function(cell, button)
|
||||
@@ -23,7 +23,7 @@ Aux.auctions_tab.FRAMES(function(m, public, private)
|
||||
end)
|
||||
|
||||
do
|
||||
local status_bar = Aux.gui.status_bar(m.frame)
|
||||
local status_bar = aux.gui.status_bar(m.frame)
|
||||
status_bar:SetWidth(265)
|
||||
status_bar:SetHeight(25)
|
||||
status_bar:SetPoint('TOPLEFT', AuxFrameContent, 'BOTTOMLEFT', 0, -6)
|
||||
@@ -32,7 +32,7 @@ Aux.auctions_tab.FRAMES(function(m, public, private)
|
||||
private.status_bar = status_bar
|
||||
end
|
||||
do
|
||||
local btn = Aux.gui.button(m.frame, 16)
|
||||
local btn = aux.gui.button(m.frame, 16)
|
||||
btn:SetPoint('TOPLEFT', m.status_bar, 'TOPRIGHT', 5, 0)
|
||||
btn:SetWidth(80)
|
||||
btn:SetHeight(24)
|
||||
@@ -41,7 +41,7 @@ Aux.auctions_tab.FRAMES(function(m, public, private)
|
||||
private.cancel_button = btn
|
||||
end
|
||||
do
|
||||
local btn = Aux.gui.button(m.frame, 16)
|
||||
local btn = aux.gui.button(m.frame, 16)
|
||||
btn:SetPoint('TOPLEFT', m.cancel_button, 'TOPRIGHT', 5, 0)
|
||||
btn:SetWidth(80)
|
||||
btn:SetHeight(24)
|
||||
|
||||
+10
-10
@@ -1,4 +1,4 @@
|
||||
local m, public, private = Aux.tab(4, 'bids_tab')
|
||||
local m, public, private = aux.tab(4, 'bids_tab')
|
||||
|
||||
private.auction_records = nil
|
||||
|
||||
@@ -34,7 +34,7 @@ function public.scan_bids()
|
||||
|
||||
m.auction_records = {}
|
||||
m.update_listing()
|
||||
Aux.scan.start{
|
||||
aux.scan.start{
|
||||
type = 'bidder',
|
||||
queries = {{ blizzard_query = {} }},
|
||||
on_page_loaded = function(page, total_pages)
|
||||
@@ -58,7 +58,7 @@ end
|
||||
|
||||
function private.test(record)
|
||||
return function(index)
|
||||
local auction_info = Aux.info.auction(index, 'bidder')
|
||||
local auction_info = aux.info.auction(index, 'bidder')
|
||||
return auction_info and auction_info.search_signature == record.search_signature
|
||||
end
|
||||
end
|
||||
@@ -74,9 +74,9 @@ do
|
||||
return
|
||||
end
|
||||
|
||||
Aux.scan.abort(scan_id)
|
||||
aux.scan.abort(scan_id)
|
||||
state = SEARCHING
|
||||
scan_id = Aux.scan_util.find(
|
||||
scan_id = aux.scan_util.find(
|
||||
record,
|
||||
m.status_bar,
|
||||
function()
|
||||
@@ -93,10 +93,10 @@ do
|
||||
if not record.high_bidder then
|
||||
m.bid_button:SetScript('OnClick', function()
|
||||
if m.test(record)(index) and m.listing:ContainsRecord(record) then
|
||||
Aux.place_bid('bidder', index, record.bid_price, record.bid_price < record.buyout_price and function()
|
||||
Aux.info.bid_update(record)
|
||||
aux.place_bid('bidder', index, record.bid_price, record.bid_price < record.buyout_price and function()
|
||||
aux.info.bid_update(record)
|
||||
m.listing:SetDatabase()
|
||||
end or Aux.f(m.listing.RemoveAuctionRecord, m.listing, record))
|
||||
end or aux.f(m.listing.RemoveAuctionRecord, m.listing, record))
|
||||
end
|
||||
end)
|
||||
m.bid_button:Enable()
|
||||
@@ -105,7 +105,7 @@ do
|
||||
if record.buyout_price > 0 then
|
||||
m.buyout_button:SetScript('OnClick', function()
|
||||
if m.test(record)(index) and m.listing:ContainsRecord(record) then
|
||||
Aux.place_bid('bidder', index, record.buyout_price, Aux.f(m.listing.RemoveAuctionRecord, m.listing, record))
|
||||
aux.place_bid('bidder', index, record.buyout_price, aux.f(m.listing.RemoveAuctionRecord, m.listing, record))
|
||||
end
|
||||
end)
|
||||
m.buyout_button:Enable()
|
||||
@@ -132,7 +132,7 @@ do
|
||||
elseif state == FOUND and not m.test(selection.record)(found_index) then
|
||||
m.buyout_button:Disable()
|
||||
m.bid_button:Disable()
|
||||
if not Aux.bid_in_progress() then
|
||||
if not aux.bid_in_progress() then
|
||||
state = IDLE
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
Aux.bids_tab.FRAMES(function(m, public, private)
|
||||
aux.bids_tab.FRAMES(function(m, public, private)
|
||||
private.frame = CreateFrame('Frame', nil, AuxFrame)
|
||||
m.frame:SetAllPoints()
|
||||
m.frame:SetScript('OnUpdate', m.on_update)
|
||||
m.frame:Hide()
|
||||
|
||||
m.frame.listing = Aux.gui.panel(m.frame)
|
||||
m.frame.listing = aux.gui.panel(m.frame)
|
||||
m.frame.listing:SetPoint('TOP', AuxFrame, 'TOP', 0, -8)
|
||||
m.frame.listing:SetPoint('BOTTOMLEFT', AuxFrameContent, 'BOTTOMLEFT', 0, 0)
|
||||
m.frame.listing:SetPoint('BOTTOMRIGHT', AuxFrameContent, 'BOTTOMRIGHT', 0, 0)
|
||||
|
||||
private.listing = Aux.auction_listing.CreateAuctionResultsTable(m.frame.listing, Aux.auction_listing.bids_config)
|
||||
private.listing = aux.auction_listing.CreateAuctionResultsTable(m.frame.listing, aux.auction_listing.bids_config)
|
||||
m.listing:SetSort(1,2,3,4,5,6,7,8)
|
||||
m.listing:Reset()
|
||||
m.listing:SetHandler('OnCellClick', function(cell, button)
|
||||
@@ -27,7 +27,7 @@ Aux.bids_tab.FRAMES(function(m, public, private)
|
||||
end)
|
||||
|
||||
do
|
||||
local status_bar = Aux.gui.status_bar(m.frame)
|
||||
local status_bar = aux.gui.status_bar(m.frame)
|
||||
status_bar:SetWidth(265)
|
||||
status_bar:SetHeight(25)
|
||||
status_bar:SetPoint('TOPLEFT', AuxFrameContent, 'BOTTOMLEFT', 0, -6)
|
||||
@@ -36,7 +36,7 @@ Aux.bids_tab.FRAMES(function(m, public, private)
|
||||
private.status_bar = status_bar
|
||||
end
|
||||
do
|
||||
local btn = Aux.gui.button(m.frame, 16)
|
||||
local btn = aux.gui.button(m.frame, 16)
|
||||
btn:SetPoint('TOPLEFT', m.status_bar, 'TOPRIGHT', 5, 0)
|
||||
btn:SetWidth(80)
|
||||
btn:SetHeight(24)
|
||||
@@ -45,7 +45,7 @@ Aux.bids_tab.FRAMES(function(m, public, private)
|
||||
private.bid_button = btn
|
||||
end
|
||||
do
|
||||
local btn = Aux.gui.button(m.frame, 16)
|
||||
local btn = aux.gui.button(m.frame, 16)
|
||||
btn:SetPoint('TOPLEFT', m.bid_button, 'TOPRIGHT', 5, 0)
|
||||
btn:SetWidth(80)
|
||||
btn:SetHeight(24)
|
||||
@@ -54,7 +54,7 @@ Aux.bids_tab.FRAMES(function(m, public, private)
|
||||
private.buyout_button = btn
|
||||
end
|
||||
do
|
||||
local btn = Aux.gui.button(m.frame, 16)
|
||||
local btn = aux.gui.button(m.frame, 16)
|
||||
btn:SetPoint('TOPLEFT', m.buyout_button, 'TOPRIGHT', 5, 0)
|
||||
btn:SetWidth(80)
|
||||
btn:SetHeight(24)
|
||||
|
||||
+51
-51
@@ -1,4 +1,4 @@
|
||||
local m, public, private = Aux.tab(2, 'post_tab')
|
||||
local m, public, private = aux.tab(2, 'post_tab')
|
||||
|
||||
local DURATION_4, DURATION_8, DURATION_24 = 120, 480, 1440
|
||||
local settings_schema = {'record', '#', {stack_size='number'}, {duration='number'}, {start_price='number'}, {buyout_price='number'}, {hidden='boolean'}}
|
||||
@@ -20,7 +20,7 @@ end
|
||||
function public.OPEN()
|
||||
m.frame:Show()
|
||||
|
||||
m.deposit:SetText('Deposit: '..Aux.money.to_string(0, nil, nil, nil, Aux.gui.inline_color({255, 254, 250, 1})))
|
||||
m.deposit:SetText('Deposit: '..aux.money.to_string(0, nil, nil, nil, aux.gui.inline_color({255, 254, 250, 1})))
|
||||
|
||||
m.set_unit_start_price(0)
|
||||
m.set_unit_buyout_price(0)
|
||||
@@ -47,12 +47,12 @@ end
|
||||
|
||||
function private.read_settings(item_key)
|
||||
item_key = item_key or m.selected_item.key
|
||||
local dataset = Aux.persistence.load_dataset()
|
||||
local dataset = aux.persistence.load_dataset()
|
||||
dataset.post = dataset.post or {}
|
||||
|
||||
local settings
|
||||
if dataset.post[item_key] then
|
||||
settings = Aux.persistence.read(settings_schema, dataset.post[item_key])
|
||||
settings = aux.persistence.read(settings_schema, dataset.post[item_key])
|
||||
else
|
||||
settings = m.default_settings()
|
||||
end
|
||||
@@ -62,28 +62,28 @@ end
|
||||
function private.write_settings(settings, item_key)
|
||||
item_key = item_key or m.selected_item.key
|
||||
|
||||
local dataset = Aux.persistence.load_dataset()
|
||||
local dataset = aux.persistence.load_dataset()
|
||||
dataset.post = dataset.post or {}
|
||||
|
||||
dataset.post[item_key] = Aux.persistence.write(settings_schema, settings)
|
||||
dataset.post[item_key] = aux.persistence.write(settings_schema, settings)
|
||||
end
|
||||
|
||||
function private.get_unit_start_price()
|
||||
local money_text = m.unit_start_price:GetText()
|
||||
return Aux.money.from_string(money_text) or (tonumber(money_text) and tonumber(money_text) * 10000) or 0
|
||||
return aux.money.from_string(money_text) or (tonumber(money_text) and tonumber(money_text) * 10000) or 0
|
||||
end
|
||||
|
||||
function private.set_unit_start_price(amount)
|
||||
m.unit_start_price:SetText(Aux.money.to_string(amount, true, nil, 3))
|
||||
m.unit_start_price:SetText(aux.money.to_string(amount, true, nil, 3))
|
||||
end
|
||||
|
||||
function private.get_unit_buyout_price()
|
||||
local money_text = m.unit_buyout_price:GetText()
|
||||
return Aux.money.from_string(money_text) or (tonumber(money_text) and tonumber(money_text) * 10000) or 0
|
||||
return aux.money.from_string(money_text) or (tonumber(money_text) and tonumber(money_text) * 10000) or 0
|
||||
end
|
||||
|
||||
function private.set_unit_buyout_price(amount)
|
||||
m.unit_buyout_price:SetText(Aux.money.to_string(amount, true, nil, 3))
|
||||
m.unit_buyout_price:SetText(aux.money.to_string(amount, true, nil, 3))
|
||||
end
|
||||
|
||||
function private.update_inventory_listing()
|
||||
@@ -91,7 +91,7 @@ function private.update_inventory_listing()
|
||||
return
|
||||
end
|
||||
|
||||
Aux.item_listing.populate(m.item_listing, Aux.util.values(Aux.util.filter(m.inventory_records, function(record)
|
||||
aux.item_listing.populate(m.item_listing, aux.util.values(aux.util.filter(m.inventory_records, function(record)
|
||||
local settings = m.read_settings(record.key)
|
||||
return record.aux_quantity > 0 and (not settings.hidden or m.show_hidden_checkbox:GetChecked())
|
||||
end)))
|
||||
@@ -110,15 +110,15 @@ function private.update_auction_listing()
|
||||
for i, auction_record in ipairs(m.existing_auctions[m.selected_item.key] or {}) do
|
||||
|
||||
local blizzard_bid_undercut, buyout_price_undercut = m.undercut(auction_record, m.stack_size_slider:GetValue())
|
||||
blizzard_bid_undercut = Aux.money.from_string(Aux.money.to_string(blizzard_bid_undercut, true, nil, 3))
|
||||
buyout_price_undercut = Aux.money.from_string(Aux.money.to_string(buyout_price_undercut, true, nil, 3))
|
||||
blizzard_bid_undercut = aux.money.from_string(aux.money.to_string(blizzard_bid_undercut, true, nil, 3))
|
||||
buyout_price_undercut = aux.money.from_string(aux.money.to_string(buyout_price_undercut, true, nil, 3))
|
||||
|
||||
local stack_blizzard_bid_undercut, stack_buyout_price_undercut = m.undercut(auction_record, m.stack_size_slider:GetValue(), true)
|
||||
stack_blizzard_bid_undercut = Aux.money.from_string(Aux.money.to_string(stack_blizzard_bid_undercut, true, nil, 3))
|
||||
stack_buyout_price_undercut = Aux.money.from_string(Aux.money.to_string(stack_buyout_price_undercut, true, nil, 3))
|
||||
stack_blizzard_bid_undercut = aux.money.from_string(aux.money.to_string(stack_blizzard_bid_undercut, true, nil, 3))
|
||||
stack_buyout_price_undercut = aux.money.from_string(aux.money.to_string(stack_buyout_price_undercut, true, nil, 3))
|
||||
|
||||
local stack_size = m.stack_size_slider:GetValue()
|
||||
local historical_value = Aux.history.value(m.selected_item.key)
|
||||
local historical_value = aux.history.value(m.selected_item.key)
|
||||
|
||||
local bid_color
|
||||
if blizzard_bid_undercut < unit_start_price and stack_blizzard_bid_undercut < unit_start_price then
|
||||
@@ -141,27 +141,27 @@ function private.update_auction_listing()
|
||||
tinsert(auction_rows, {
|
||||
cols = {
|
||||
{ value=auction_record.own and GREEN_FONT_COLOR_CODE..auction_record.count..FONT_COLOR_CODE_CLOSE or auction_record.count },
|
||||
{ value=Aux.auction_listing.time_left(auction_record.duration) },
|
||||
{ value=aux.auction_listing.time_left(auction_record.duration) },
|
||||
{ value=auction_record.stack_size == stack_size and GREEN_FONT_COLOR_CODE..auction_record.stack_size..FONT_COLOR_CODE_CLOSE or auction_record.stack_size },
|
||||
{ value=Aux.money.to_string(auction_record.unit_blizzard_bid, true, nil, 3, bid_color) },
|
||||
{ value=historical_value and Aux.auction_listing.percentage_historical(Aux.util.round(auction_record.unit_blizzard_bid / historical_value * 100)) or '---' },
|
||||
{ value=auction_record.unit_buyout_price > 0 and Aux.money.to_string(auction_record.unit_buyout_price, true, nil, 3, buyout_color) or '---' },
|
||||
{ value=auction_record.unit_buyout_price > 0 and historical_value and Aux.auction_listing.percentage_historical(Aux.util.round(auction_record.unit_buyout_price / historical_value * 100)) or '---' },
|
||||
{ value=aux.money.to_string(auction_record.unit_blizzard_bid, true, nil, 3, bid_color) },
|
||||
{ value=historical_value and aux.auction_listing.percentage_historical(aux.util.round(auction_record.unit_blizzard_bid / historical_value * 100)) or '---' },
|
||||
{ value=auction_record.unit_buyout_price > 0 and aux.money.to_string(auction_record.unit_buyout_price, true, nil, 3, buyout_color) or '---' },
|
||||
{ value=auction_record.unit_buyout_price > 0 and historical_value and aux.auction_listing.percentage_historical(aux.util.round(auction_record.unit_buyout_price / historical_value * 100)) or '---' },
|
||||
},
|
||||
record = auction_record,
|
||||
})
|
||||
end
|
||||
sort(auction_rows, function(a, b)
|
||||
return Aux.sort.multi_lt(
|
||||
return aux.sort.multi_lt(
|
||||
{
|
||||
a.record.unit_buyout_price == 0 and Aux.huge or a.record.unit_buyout_price,
|
||||
a.record.unit_buyout_price == 0 and aux.huge or a.record.unit_buyout_price,
|
||||
a.record.unit_blizzard_bid,
|
||||
a.record.stack_size,
|
||||
b.record.own and 1 or 0,
|
||||
a.record.duration,
|
||||
},
|
||||
{
|
||||
b.record.unit_buyout_price == 0 and Aux.huge or b.record.unit_buyout_price,
|
||||
b.record.unit_buyout_price == 0 and aux.huge or b.record.unit_buyout_price,
|
||||
b.record.unit_blizzard_bid,
|
||||
b.record.stack_size,
|
||||
a.record.own and 1 or 0,
|
||||
@@ -174,7 +174,7 @@ function private.update_auction_listing()
|
||||
end
|
||||
|
||||
function public.select_item(item_key)
|
||||
for _, inventory_record in Aux.util.filter(m.inventory_records, function(record) return record.aux_quantity > 0 end) do
|
||||
for _, inventory_record in aux.util.filter(m.inventory_records, function(record) return record.aux_quantity > 0 end) do
|
||||
if inventory_record.key == item_key then
|
||||
m.set_item(inventory_record)
|
||||
break
|
||||
@@ -188,13 +188,13 @@ function private.price_update()
|
||||
|
||||
local start_price_input = m.get_unit_start_price()
|
||||
settings.start_price = start_price_input
|
||||
local historical_value = Aux.history.value(m.selected_item.key)
|
||||
m.start_price_percentage:SetText(historical_value and Aux.auction_listing.percentage_historical(Aux.util.round(start_price_input / historical_value * 100)) or '---')
|
||||
local historical_value = aux.history.value(m.selected_item.key)
|
||||
m.start_price_percentage:SetText(historical_value and aux.auction_listing.percentage_historical(aux.util.round(start_price_input / historical_value * 100)) or '---')
|
||||
|
||||
local buyout_price_input = m.get_unit_buyout_price()
|
||||
settings.buyout_price = buyout_price_input
|
||||
local historical_value = Aux.history.value(m.selected_item.key)
|
||||
m.buyout_price_percentage:SetText(historical_value and Aux.auction_listing.percentage_historical(Aux.util.round(buyout_price_input / historical_value * 100)) or '---')
|
||||
local historical_value = aux.history.value(m.selected_item.key)
|
||||
m.buyout_price_percentage:SetText(historical_value and aux.auction_listing.percentage_historical(aux.util.round(buyout_price_input / historical_value * 100)) or '---')
|
||||
|
||||
m.write_settings(settings)
|
||||
end
|
||||
@@ -219,7 +219,7 @@ function private.post_auctions()
|
||||
duration_code = 4
|
||||
end
|
||||
|
||||
Aux.post.start(
|
||||
aux.post.start(
|
||||
key,
|
||||
stack_size,
|
||||
duration,
|
||||
@@ -278,7 +278,7 @@ function private.update_item_configuration()
|
||||
|
||||
m.item.texture:SetTexture(nil)
|
||||
m.item.count:SetText()
|
||||
m.item.name:SetTextColor(unpack(Aux.gui.config.label_color.enabled))
|
||||
m.item.name:SetTextColor(unpack(aux.gui.config.label_color.enabled))
|
||||
m.item.name:SetText('No item selected')
|
||||
|
||||
m.unit_start_price:Hide()
|
||||
@@ -313,13 +313,13 @@ function private.update_item_configuration()
|
||||
m.stack_count_slider.editbox:SetNumber(m.stack_count_slider:GetValue())
|
||||
|
||||
do
|
||||
local deposit_factor = Aux.neutral_faction() and 0.25 or 0.05
|
||||
local deposit_factor = aux.neutral_faction() and 0.25 or 0.05
|
||||
local stack_size = m.stack_size_slider:GetValue()
|
||||
local stack_count
|
||||
stack_count = m.stack_count_slider:GetValue()
|
||||
local deposit = floor(m.selected_item.unit_vendor_price * deposit_factor * (m.selected_item.max_charges and 1 or stack_size)) * stack_count * UIDropDownMenu_GetSelectedValue(m.duration_dropdown) / 120
|
||||
|
||||
m.deposit:SetText('Deposit: '..Aux.money.to_string(deposit, nil, nil, nil, Aux.gui.inline_color({255, 254, 250, 1})))
|
||||
m.deposit:SetText('Deposit: '..aux.money.to_string(deposit, nil, nil, nil, aux.gui.inline_color({255, 254, 250, 1})))
|
||||
end
|
||||
|
||||
m.refresh_button:Enable()
|
||||
@@ -327,8 +327,8 @@ function private.update_item_configuration()
|
||||
end
|
||||
|
||||
function private.undercut(record, stack_size, stack)
|
||||
local start_price = Aux.util.round(record.unit_blizzard_bid * (stack and record.stack_size or stack_size))
|
||||
local buyout_price = Aux.util.round(record.unit_buyout_price * (stack and record.stack_size or stack_size))
|
||||
local start_price = aux.util.round(record.unit_blizzard_bid * (stack and record.stack_size or stack_size))
|
||||
local buyout_price = aux.util.round(record.unit_buyout_price * (stack and record.stack_size or stack_size))
|
||||
|
||||
if not record.own then
|
||||
start_price = max(0, start_price - 1)
|
||||
@@ -351,16 +351,16 @@ end
|
||||
|
||||
function private.unit_vendor_price(item_key)
|
||||
|
||||
for slot in Aux.util.inventory() do
|
||||
for slot in aux.util.inventory() do
|
||||
|
||||
local item_info = Aux.info.container_item(unpack(slot))
|
||||
local item_info = aux.info.container_item(unpack(slot))
|
||||
if item_info and item_info.item_key == item_key then
|
||||
|
||||
if Aux.info.auctionable(item_info.tooltip, nil, item_info.lootable) then
|
||||
if aux.info.auctionable(item_info.tooltip, nil, item_info.lootable) then
|
||||
ClearCursor()
|
||||
PickupContainerItem(unpack(slot))
|
||||
ClickAuctionSellItemButton()
|
||||
local auction_sell_item = Aux.info.auction_sell_item()
|
||||
local auction_sell_item = aux.info.auction_sell_item()
|
||||
ClearCursor()
|
||||
ClickAuctionSellItemButton()
|
||||
ClearCursor()
|
||||
@@ -375,9 +375,9 @@ end
|
||||
|
||||
function private.update_historical_value_button()
|
||||
if m.selected_item then
|
||||
local historical_value = Aux.history.value(m.selected_item.key)
|
||||
local historical_value = aux.history.value(m.selected_item.key)
|
||||
m.historical_value_button.amount = historical_value
|
||||
m.historical_value_button:SetText(historical_value and Aux.money.to_string(historical_value, true, nil, 3) or '---')
|
||||
m.historical_value_button:SetText(historical_value and aux.money.to_string(historical_value, true, nil, 3) or '---')
|
||||
end
|
||||
end
|
||||
|
||||
@@ -392,7 +392,7 @@ function private.set_item(item)
|
||||
return
|
||||
end
|
||||
|
||||
Aux.scan.abort(m.scan_id)
|
||||
aux.scan.abort(m.scan_id)
|
||||
|
||||
m.selected_item = item
|
||||
|
||||
@@ -405,8 +405,8 @@ function private.set_item(item)
|
||||
m.stack_size_slider:SetValue(settings.stack_size)
|
||||
m.quantity_update(true)
|
||||
|
||||
m.unit_start_price:SetText(Aux.money.to_string(settings.start_price, true, nil, 3, nil, true))
|
||||
m.unit_buyout_price:SetText(Aux.money.to_string(settings.buyout_price, true, nil, 3, nil, true))
|
||||
m.unit_start_price:SetText(aux.money.to_string(settings.start_price, true, nil, 3, nil, true))
|
||||
m.unit_buyout_price:SetText(aux.money.to_string(settings.buyout_price, true, nil, 3, nil, true))
|
||||
|
||||
if not m.existing_auctions[m.selected_item.key] then
|
||||
m.refresh_entries()
|
||||
@@ -422,13 +422,13 @@ function private.update_inventory_records()
|
||||
|
||||
local auction_candidate_map = {}
|
||||
|
||||
for slot in Aux.util.inventory() do
|
||||
for slot in aux.util.inventory() do
|
||||
|
||||
local item_info = Aux.info.container_item(unpack(slot))
|
||||
local item_info = aux.info.container_item(unpack(slot))
|
||||
if item_info then
|
||||
local charge_class = item_info.charges or 0
|
||||
|
||||
if Aux.info.auctionable(item_info.tooltip, nil, item_info.lootable) then
|
||||
if aux.info.auctionable(item_info.tooltip, nil, item_info.lootable) then
|
||||
if not auction_candidate_map[item_info.item_key] then
|
||||
|
||||
local availability = {}
|
||||
@@ -476,12 +476,12 @@ function private.refresh_entries()
|
||||
|
||||
m.existing_auctions[item_key] = nil
|
||||
|
||||
local query = Aux.scan_util.item_query(item_id)
|
||||
local query = aux.scan_util.item_query(item_id)
|
||||
|
||||
m.status_bar:update_status(0,0)
|
||||
m.status_bar:set_text('Scanning auctions...')
|
||||
|
||||
m.scan_id = Aux.scan.start{
|
||||
m.scan_id = aux.scan.start{
|
||||
type = 'list',
|
||||
ignore_owner = true,
|
||||
queries = { query },
|
||||
@@ -521,7 +521,7 @@ function private.record_auction(key, aux_quantity, unit_blizzard_bid, unit_buyou
|
||||
m.existing_auctions[key] = m.existing_auctions[key] or {}
|
||||
local entry
|
||||
for _, existing_entry in ipairs(m.existing_auctions[key]) do
|
||||
if unit_blizzard_bid == existing_entry.unit_blizzard_bid and unit_buyout_price == existing_entry.unit_buyout_price and aux_quantity == existing_entry.stack_size and duration == existing_entry.duration and Aux.is_player(owner) == existing_entry.own then
|
||||
if unit_blizzard_bid == existing_entry.unit_blizzard_bid and unit_buyout_price == existing_entry.unit_buyout_price and aux_quantity == existing_entry.stack_size and duration == existing_entry.duration and aux.is_player(owner) == existing_entry.own then
|
||||
entry = existing_entry
|
||||
end
|
||||
end
|
||||
@@ -532,7 +532,7 @@ function private.record_auction(key, aux_quantity, unit_blizzard_bid, unit_buyou
|
||||
unit_blizzard_bid = unit_blizzard_bid,
|
||||
unit_buyout_price = unit_buyout_price,
|
||||
duration = duration,
|
||||
own = Aux.is_player(owner),
|
||||
own = aux.is_player(owner),
|
||||
count = 0,
|
||||
}
|
||||
tinsert(m.existing_auctions[key], entry)
|
||||
|
||||
+41
-41
@@ -1,4 +1,4 @@
|
||||
Aux.post_tab.FRAMES(function(m, public, private)
|
||||
aux.post_tab.FRAMES(function(m, public, private)
|
||||
private.frame = CreateFrame('Frame', nil, AuxFrame)
|
||||
m.frame:SetAllPoints()
|
||||
m.frame:SetScript('OnUpdate', m.on_update)
|
||||
@@ -9,17 +9,17 @@ Aux.post_tab.FRAMES(function(m, public, private)
|
||||
m.frame.content:SetPoint('BOTTOMLEFT', AuxFrameContent, 'BOTTOMLEFT', 0, 0)
|
||||
m.frame.content:SetPoint('BOTTOMRIGHT', AuxFrameContent, 'BOTTOMRIGHT', 0, 0)
|
||||
|
||||
m.frame.inventory = Aux.gui.panel(m.frame.content)
|
||||
m.frame.inventory = aux.gui.panel(m.frame.content)
|
||||
m.frame.inventory:SetWidth(212)
|
||||
m.frame.inventory:SetPoint('TOPLEFT', 0, 0)
|
||||
m.frame.inventory:SetPoint('BOTTOMLEFT', 0, 0)
|
||||
|
||||
m.frame.parameters = Aux.gui.panel(m.frame.content)
|
||||
m.frame.parameters = aux.gui.panel(m.frame.content)
|
||||
m.frame.parameters:SetHeight(173)
|
||||
m.frame.parameters:SetPoint('TOPLEFT', m.frame.inventory, 'TOPRIGHT', 2.5, 0)
|
||||
m.frame.parameters:SetPoint('TOPRIGHT', 0, 0)
|
||||
|
||||
m.frame.auctions = Aux.gui.panel(m.frame.content)
|
||||
m.frame.auctions = aux.gui.panel(m.frame.content)
|
||||
m.frame.auctions:SetHeight(228)
|
||||
m.frame.auctions:SetPoint('BOTTOMLEFT', m.frame.inventory, 'BOTTOMRIGHT', 2.5, 0)
|
||||
m.frame.auctions:SetPoint('BOTTOMRIGHT', 0, 0)
|
||||
@@ -32,27 +32,27 @@ Aux.post_tab.FRAMES(function(m, public, private)
|
||||
checkbox:SetScript('OnClick', function()
|
||||
m.refresh = true
|
||||
end)
|
||||
local label = Aux.gui.label(checkbox, Aux.gui.config.small_font_size)
|
||||
local label = aux.gui.label(checkbox, aux.gui.config.small_font_size)
|
||||
label:SetPoint('LEFT', checkbox, 'RIGHT', 2, 1)
|
||||
label:SetText('Show hidden items')
|
||||
private.show_hidden_checkbox = checkbox
|
||||
end
|
||||
|
||||
Aux.gui.horizontal_line(m.frame.inventory, -48)
|
||||
aux.gui.horizontal_line(m.frame.inventory, -48)
|
||||
|
||||
private.item_listing = Aux.item_listing.create(
|
||||
private.item_listing = aux.item_listing.create(
|
||||
m.frame.inventory,
|
||||
function()
|
||||
if arg1 == 'LeftButton' then
|
||||
m.set_item(this.item_record)
|
||||
elseif arg1 == 'RightButton' then
|
||||
Aux.tab_group:set_tab(1)
|
||||
Aux.search_tab.set_filter(strlower(Aux.info.item(this.item_record.item_id).name)..'/exact')
|
||||
Aux.search_tab.execute(nil, false)
|
||||
aux.tab_group:set_tab(1)
|
||||
aux.search_tab.set_filter(strlower(aux.info.item(this.item_record.item_id).name)..'/exact')
|
||||
aux.search_tab.execute(nil, false)
|
||||
end
|
||||
end,
|
||||
function()
|
||||
Aux.info.set_tooltip(this.item_record.itemstring, this, 'ANCHOR_RIGHT')
|
||||
aux.info.set_tooltip(this.item_record.itemstring, this, 'ANCHOR_RIGHT')
|
||||
end,
|
||||
function()
|
||||
GameTooltip:Hide()
|
||||
@@ -62,7 +62,7 @@ Aux.post_tab.FRAMES(function(m, public, private)
|
||||
end
|
||||
)
|
||||
|
||||
private.auction_listing = Aux.listing.CreateScrollingTable(m.frame.auctions)
|
||||
private.auction_listing = aux.listing.CreateScrollingTable(m.frame.auctions)
|
||||
m.auction_listing:SetColInfo({
|
||||
{ name='Auctions', width=.12, align='CENTER' },
|
||||
{ name='Left', width=.1, align='CENTER' },
|
||||
@@ -75,7 +75,7 @@ Aux.post_tab.FRAMES(function(m, public, private)
|
||||
m.auction_listing:EnableSorting(false)
|
||||
m.auction_listing:DisableSelection(true)
|
||||
m.auction_listing:SetHandler('OnClick', function(table, row_data, column, button)
|
||||
local column_index = Aux.util.key(column, column.row.cols)
|
||||
local column_index = aux.util.key(column, column.row.cols)
|
||||
local unit_start_price, unit_buyout_price = m.undercut(row_data.record, m.stack_size_slider:GetValue(), button == 'RightButton')
|
||||
if column_index == 3 then
|
||||
m.stack_size_slider:SetValue(row_data.record.stack_size)
|
||||
@@ -87,7 +87,7 @@ Aux.post_tab.FRAMES(function(m, public, private)
|
||||
end)
|
||||
|
||||
do
|
||||
local status_bar = Aux.gui.status_bar(m.frame)
|
||||
local status_bar = aux.gui.status_bar(m.frame)
|
||||
status_bar:SetWidth(265)
|
||||
status_bar:SetHeight(25)
|
||||
status_bar:SetPoint('TOPLEFT', AuxFrameContent, 'BOTTOMLEFT', 0, -6)
|
||||
@@ -96,7 +96,7 @@ Aux.post_tab.FRAMES(function(m, public, private)
|
||||
private.status_bar = status_bar
|
||||
end
|
||||
do
|
||||
local btn = Aux.gui.button(m.frame.parameters, 16)
|
||||
local btn = aux.gui.button(m.frame.parameters, 16)
|
||||
btn:SetPoint('TOPLEFT', m.status_bar, 'TOPRIGHT', 5, 0)
|
||||
btn:SetWidth(80)
|
||||
btn:SetHeight(24)
|
||||
@@ -105,31 +105,31 @@ Aux.post_tab.FRAMES(function(m, public, private)
|
||||
private.post_button = btn
|
||||
end
|
||||
do
|
||||
local btn = Aux.gui.button(m.frame.parameters, 16)
|
||||
local btn = aux.gui.button(m.frame.parameters, 16)
|
||||
btn:SetPoint('TOPLEFT', m.post_button, 'TOPRIGHT', 5, 0)
|
||||
btn:SetWidth(80)
|
||||
btn:SetHeight(24)
|
||||
btn:SetText('Refresh')
|
||||
btn:SetScript('OnClick', function()
|
||||
Aux.scan.abort(m.scan_id)
|
||||
aux.scan.abort(m.scan_id)
|
||||
m.refresh_entries()
|
||||
m.refresh = true
|
||||
end)
|
||||
private.refresh_button = btn
|
||||
end
|
||||
do
|
||||
local item = Aux.gui.item(m.frame.parameters)
|
||||
local item = aux.gui.item(m.frame.parameters)
|
||||
item:SetPoint('TOPLEFT', 10, -8)
|
||||
item:EnableMouse()
|
||||
item:SetScript('OnReceiveDrag', function()
|
||||
local item_info = Aux.cursor_item()
|
||||
local item_info = aux.cursor_item()
|
||||
if item_info then
|
||||
m.select_item(item_info.item_key)
|
||||
end
|
||||
ClearCursor()
|
||||
end)
|
||||
item:SetScript('OnClick', function()
|
||||
local item_info = Aux.cursor_item()
|
||||
local item_info = aux.cursor_item()
|
||||
if item_info then
|
||||
m.select_item(item_info.item_key)
|
||||
end
|
||||
@@ -143,7 +143,7 @@ Aux.post_tab.FRAMES(function(m, public, private)
|
||||
item:SetScript('OnEnter', function()
|
||||
highlight:Show()
|
||||
if m.selected_item then
|
||||
Aux.info.set_tooltip(m.selected_item.itemstring, this, 'ANCHOR_RIGHT')
|
||||
aux.info.set_tooltip(m.selected_item.itemstring, this, 'ANCHOR_RIGHT')
|
||||
end
|
||||
end)
|
||||
item:SetScript('OnLeave', function()
|
||||
@@ -153,7 +153,7 @@ Aux.post_tab.FRAMES(function(m, public, private)
|
||||
private.item = item
|
||||
end
|
||||
do
|
||||
local slider = Aux.gui.slider(m.frame.parameters)
|
||||
local slider = aux.gui.slider(m.frame.parameters)
|
||||
slider:SetValueStep(1)
|
||||
slider:SetPoint('TOPLEFT', 16, -73)
|
||||
slider:SetWidth(190)
|
||||
@@ -184,7 +184,7 @@ Aux.post_tab.FRAMES(function(m, public, private)
|
||||
private.stack_size_slider = slider
|
||||
end
|
||||
do
|
||||
local slider = Aux.gui.slider(m.frame.parameters)
|
||||
local slider = aux.gui.slider(m.frame.parameters)
|
||||
slider:SetValueStep(1)
|
||||
slider:SetPoint('TOPLEFT', m.stack_size_slider, 'BOTTOMLEFT', 0, -30)
|
||||
slider:SetWidth(190)
|
||||
@@ -207,18 +207,18 @@ Aux.post_tab.FRAMES(function(m, public, private)
|
||||
private.stack_count_slider = slider
|
||||
end
|
||||
do
|
||||
local dropdown = Aux.gui.dropdown(m.frame.parameters)
|
||||
local dropdown = aux.gui.dropdown(m.frame.parameters)
|
||||
dropdown:SetPoint('TOPLEFT', m.stack_count_slider, 'BOTTOMLEFT', 0, -21)
|
||||
dropdown:SetWidth(90)
|
||||
dropdown:SetHeight(10)
|
||||
local label = Aux.gui.label(dropdown, Aux.gui.config.small_font_size)
|
||||
local label = aux.gui.label(dropdown, aux.gui.config.small_font_size)
|
||||
label:SetPoint('BOTTOMLEFT', dropdown, 'TOPLEFT', -2, -4)
|
||||
label:SetText('Duration')
|
||||
UIDropDownMenu_Initialize(dropdown, m.initialize_duration_dropdown)
|
||||
dropdown:SetScript('OnShow', function()
|
||||
UIDropDownMenu_Initialize(this, m.initialize_duration_dropdown)
|
||||
end)
|
||||
local label = Aux.gui.label(dropdown, Aux.gui.config.medium_font_size)
|
||||
local label = aux.gui.label(dropdown, aux.gui.config.medium_font_size)
|
||||
label:SetPoint('LEFT', dropdown, 'RIGHT', 25, 0)
|
||||
private.deposit = label
|
||||
private.duration_dropdown = dropdown
|
||||
@@ -234,18 +234,18 @@ Aux.post_tab.FRAMES(function(m, public, private)
|
||||
m.write_settings(settings)
|
||||
m.refresh = true
|
||||
end)
|
||||
local label = Aux.gui.label(checkbox, Aux.gui.config.small_font_size)
|
||||
local label = aux.gui.label(checkbox, aux.gui.config.small_font_size)
|
||||
label:SetPoint('LEFT', checkbox, 'RIGHT', 2, 1)
|
||||
label:SetText('Hide this item')
|
||||
private.hide_checkbox = checkbox
|
||||
end
|
||||
do
|
||||
local editbox = Aux.gui.editbox(m.frame.parameters)
|
||||
local editbox = aux.gui.editbox(m.frame.parameters)
|
||||
editbox:SetPoint('TOPRIGHT', -65, -66)
|
||||
editbox:SetJustifyH('RIGHT')
|
||||
editbox:SetWidth(150)
|
||||
editbox:SetScript('OnTextChanged', function()
|
||||
this.pretty:SetText(Aux.money.to_string(m.get_unit_start_price(), true, nil, 3))
|
||||
this.pretty:SetText(aux.money.to_string(m.get_unit_start_price(), true, nil, 3))
|
||||
m.refresh = true
|
||||
end)
|
||||
editbox:SetScript('OnTabPressed', function()
|
||||
@@ -265,19 +265,19 @@ Aux.post_tab.FRAMES(function(m, public, private)
|
||||
this.pretty:Hide()
|
||||
end)
|
||||
editbox:SetScript('OnEditFocusLost', function()
|
||||
this:SetText(Aux.money.to_string(m.get_unit_start_price(), true, nil, 3, nil, true))
|
||||
this:SetText(aux.money.to_string(m.get_unit_start_price(), true, nil, 3, nil, true))
|
||||
this.pretty:Show()
|
||||
end)
|
||||
editbox.pretty = Aux.gui.label(editbox, Aux.gui.config.medium_font_size)
|
||||
editbox.pretty = aux.gui.label(editbox, aux.gui.config.medium_font_size)
|
||||
editbox.pretty:SetAllPoints()
|
||||
editbox.pretty:SetJustifyH('RIGHT')
|
||||
do
|
||||
local label = Aux.gui.label(editbox, Aux.gui.config.small_font_size)
|
||||
local label = aux.gui.label(editbox, aux.gui.config.small_font_size)
|
||||
label:SetPoint('BOTTOMLEFT', editbox, 'TOPLEFT', -2, 1)
|
||||
label:SetText('Unit Starting Price')
|
||||
end
|
||||
do
|
||||
local label = Aux.gui.label(editbox, Aux.gui.config.small_font_size)
|
||||
local label = aux.gui.label(editbox, aux.gui.config.small_font_size)
|
||||
label:SetPoint('LEFT', editbox, 'RIGHT', 3, 0)
|
||||
label:SetWidth(50)
|
||||
label:SetJustifyH('CENTER')
|
||||
@@ -286,12 +286,12 @@ Aux.post_tab.FRAMES(function(m, public, private)
|
||||
private.unit_start_price = editbox
|
||||
end
|
||||
do
|
||||
local editbox = Aux.gui.editbox(m.frame.parameters)
|
||||
local editbox = aux.gui.editbox(m.frame.parameters)
|
||||
editbox:SetPoint('TOPRIGHT', m.unit_start_price, 'BOTTOMRIGHT', 0, -18)
|
||||
editbox:SetJustifyH('RIGHT')
|
||||
editbox:SetWidth(150)
|
||||
editbox:SetScript('OnTextChanged', function()
|
||||
this.pretty:SetText(Aux.money.to_string(m.get_unit_buyout_price(), true, nil, 3))
|
||||
this.pretty:SetText(aux.money.to_string(m.get_unit_buyout_price(), true, nil, 3))
|
||||
m.refresh = true
|
||||
end)
|
||||
editbox:SetScript('OnTabPressed', function()
|
||||
@@ -309,19 +309,19 @@ Aux.post_tab.FRAMES(function(m, public, private)
|
||||
this.pretty:Hide()
|
||||
end)
|
||||
editbox:SetScript('OnEditFocusLost', function()
|
||||
this:SetText(Aux.money.to_string(m.get_unit_buyout_price(), true, nil, 3, nil, true))
|
||||
this:SetText(aux.money.to_string(m.get_unit_buyout_price(), true, nil, 3, nil, true))
|
||||
this.pretty:Show()
|
||||
end)
|
||||
editbox.pretty = Aux.gui.label(editbox, Aux.gui.config.medium_font_size)
|
||||
editbox.pretty = aux.gui.label(editbox, aux.gui.config.medium_font_size)
|
||||
editbox.pretty:SetAllPoints()
|
||||
editbox.pretty:SetJustifyH('RIGHT')
|
||||
do
|
||||
local label = Aux.gui.label(editbox, Aux.gui.config.small_font_size)
|
||||
local label = aux.gui.label(editbox, aux.gui.config.small_font_size)
|
||||
label:SetPoint('BOTTOMLEFT', editbox, 'TOPLEFT', -2, 1)
|
||||
label:SetText('Unit Buyout Price')
|
||||
end
|
||||
do
|
||||
local label = Aux.gui.label(editbox, Aux.gui.config.small_font_size)
|
||||
local label = aux.gui.label(editbox, aux.gui.config.small_font_size)
|
||||
label:SetPoint('LEFT', editbox, 'RIGHT', 3, 0)
|
||||
label:SetWidth(50)
|
||||
label:SetJustifyH('CENTER')
|
||||
@@ -330,7 +330,7 @@ Aux.post_tab.FRAMES(function(m, public, private)
|
||||
private.unit_buyout_price = editbox
|
||||
end
|
||||
do
|
||||
local btn = Aux.gui.button(m.frame.parameters, 16)
|
||||
local btn = aux.gui.button(m.frame.parameters, 16)
|
||||
btn:SetPoint('TOPRIGHT', -15, -143)
|
||||
btn:SetWidth(150)
|
||||
btn:SetHeight(20)
|
||||
@@ -343,7 +343,7 @@ Aux.post_tab.FRAMES(function(m, public, private)
|
||||
m.set_unit_buyout_price(this.amount)
|
||||
end
|
||||
end)
|
||||
local label = Aux.gui.label(btn, Aux.gui.config.small_font_size)
|
||||
local label = aux.gui.label(btn, aux.gui.config.small_font_size)
|
||||
label:SetPoint('BOTTOMLEFT', btn, 'TOPLEFT', -2, 1)
|
||||
label:SetText('Historical Value')
|
||||
private.historical_value_button = btn
|
||||
|
||||
+53
-53
@@ -1,4 +1,4 @@
|
||||
local m, public, private = Aux.tab(1, 'search_tab')
|
||||
local m, public, private = aux.tab(1, 'search_tab')
|
||||
|
||||
aux_favorite_searches = {}
|
||||
aux_recent_searches = {}
|
||||
@@ -86,7 +86,7 @@ end
|
||||
|
||||
function private.update_search_listings()
|
||||
local favorite_search_rows = {}
|
||||
for i, favorite_search in ipairs(aux_favorite_searches) do
|
||||
for i, favorite_search in aux_favorite_searches do
|
||||
local name = strsub(favorite_search.prettified, 1, 250)
|
||||
tinsert(favorite_search_rows, {
|
||||
cols = {{value=name}},
|
||||
@@ -97,7 +97,7 @@ function private.update_search_listings()
|
||||
m.favorite_searches_listing:SetData(favorite_search_rows)
|
||||
|
||||
local recent_search_rows = {}
|
||||
for i, recent_search in ipairs(aux_recent_searches) do
|
||||
for i, recent_search in aux_recent_searches do
|
||||
local name = strsub(recent_search.prettified, 1, 250)
|
||||
tinsert(recent_search_rows, {
|
||||
cols = {{value=name}},
|
||||
@@ -135,7 +135,7 @@ end
|
||||
|
||||
function public.add_filter(filter_string)
|
||||
local old_filter_string = m.search_box:GetText()
|
||||
old_filter_string = Aux.util.trim(old_filter_string)
|
||||
old_filter_string = aux.util.trim(old_filter_string)
|
||||
|
||||
if old_filter_string ~= '' then
|
||||
old_filter_string = old_filter_string..';'
|
||||
@@ -146,12 +146,12 @@ end
|
||||
|
||||
function private.update_auto_buy_filter()
|
||||
if aux_auto_buy_filter ~= '' then
|
||||
local queries = Aux.filter.queries(aux_auto_buy_filter)
|
||||
local queries = aux.filter.queries(aux_auto_buy_filter)
|
||||
if queries then
|
||||
if getn(queries) > 1 then
|
||||
Aux.log('Error: The automatic buyout filter may contain only one query')
|
||||
elseif Aux.util.size(queries[1].blizzard_query) > 0 then
|
||||
Aux.log('Error: The automatic buyout filter does not support Blizzard filters')
|
||||
aux.log('Error: The automatic buyout filter may contain only one query')
|
||||
elseif aux.util.size(queries[1].blizzard_query) > 0 then
|
||||
aux.log('Error: The automatic buyout filter does not support Blizzard filters')
|
||||
else
|
||||
m.auto_buy_validator = queries[1].validator
|
||||
m.auto_buy_filter_button.prettified = queries[1].prettified
|
||||
@@ -188,7 +188,7 @@ function private.clear_form()
|
||||
end
|
||||
|
||||
function private.discard_continuation()
|
||||
Aux.scan.abort(m.search_scan_id)
|
||||
aux.scan.abort(m.search_scan_id)
|
||||
m.current_search().continuation = nil
|
||||
m.update_continuation()
|
||||
end
|
||||
@@ -215,7 +215,7 @@ function private.start_real_time_scan(query, search, continuation)
|
||||
|
||||
local next_page
|
||||
local new_records = {}
|
||||
m.search_scan_id = Aux.scan.start{
|
||||
m.search_scan_id = aux.scan.start{
|
||||
type = 'list',
|
||||
queries = {query},
|
||||
auto_buy_validator = search.auto_buy_validator,
|
||||
@@ -233,8 +233,8 @@ function private.start_real_time_scan(query, search, continuation)
|
||||
if not ignore_page then
|
||||
if search.auto_buy then
|
||||
ctrl.suspend()
|
||||
Aux.place_bid('list', auction_record.index, auction_record.buyout_price, Aux.f(ctrl.resume, true))
|
||||
Aux.control.thread(Aux.control.sleep, 10, Aux.f(ctrl.resume, false))
|
||||
aux.place_bid('list', auction_record.index, auction_record.buyout_price, aux.f(ctrl.resume, true))
|
||||
aux.control.thread(aux.control.sleep, 10, aux.f(ctrl.resume, false))
|
||||
else
|
||||
tinsert(new_records, auction_record)
|
||||
end
|
||||
@@ -299,7 +299,7 @@ function private.start_search(queries, continuation)
|
||||
end
|
||||
|
||||
|
||||
m.search_scan_id = Aux.scan.start{
|
||||
m.search_scan_id = aux.scan.start{
|
||||
type = 'list',
|
||||
queries = queries,
|
||||
auto_buy_validator = search.auto_buy_validator,
|
||||
@@ -329,8 +329,8 @@ function private.start_search(queries, continuation)
|
||||
on_auction = function(auction_record, ctrl)
|
||||
if search.auto_buy then
|
||||
ctrl.suspend()
|
||||
Aux.place_bid('list', auction_record.index, auction_record.buyout_price, Aux.f(ctrl.resume, true))
|
||||
Aux.control.thread(Aux.control.sleep, 10, Aux.f(ctrl.resume, false))
|
||||
aux.place_bid('list', auction_record.index, auction_record.buyout_price, aux.f(ctrl.resume, true))
|
||||
aux.control.thread(aux.control.sleep, 10, aux.f(ctrl.resume, false))
|
||||
elseif getn(search.records) < 1000 then
|
||||
tinsert(search.records, auction_record)
|
||||
if getn(search.records) == 1000 then
|
||||
@@ -381,15 +381,15 @@ function public.execute(resume, real_time)
|
||||
end
|
||||
local filter_string = m.search_box:GetText()
|
||||
|
||||
local queries = Aux.filter.queries(filter_string)
|
||||
local queries = aux.filter.queries(filter_string)
|
||||
if not queries then
|
||||
return
|
||||
elseif real_time then
|
||||
if getn(queries) > 1 then
|
||||
Aux.log('Invalid filter: The real time mode does not support multiple queries')
|
||||
aux.log('Invalid filter: The real time mode does not support multiple queries')
|
||||
return
|
||||
elseif queries[1].blizzard_query.first_page or queries[1].blizzard_query.last_page then
|
||||
Aux.log('Invalid filter: The real time mode does not support page range filters')
|
||||
aux.log('Invalid filter: The real time mode does not support page range filters')
|
||||
return
|
||||
end
|
||||
end
|
||||
@@ -400,7 +400,7 @@ function public.execute(resume, real_time)
|
||||
m.current_search().table:SetSelectedRecord()
|
||||
else
|
||||
if filter_string ~= m.current_search().filter_string then
|
||||
m.new_search(filter_string, Aux.util.join(Aux.util.map(queries, function(filter) return filter.prettified end), ';'))
|
||||
m.new_search(filter_string, aux.util.join(aux.util.map(queries, function(filter) return filter.prettified end), ';'))
|
||||
else
|
||||
m.current_search().records = {}
|
||||
m.current_search().table:SetDatabase(m.current_search().records)
|
||||
@@ -432,19 +432,19 @@ end
|
||||
|
||||
function private.blizzard_page_index(str)
|
||||
if tonumber(str) then
|
||||
return Aux.util.round(max(0, tonumber(str) - 1))
|
||||
return aux.util.round(max(0, tonumber(str) - 1))
|
||||
end
|
||||
end
|
||||
|
||||
function private.blizzard_level(str)
|
||||
if tonumber(str) then
|
||||
return Aux.util.round(max(1, min(60, tonumber(str))))
|
||||
return aux.util.round(max(1, min(60, tonumber(str))))
|
||||
end
|
||||
end
|
||||
|
||||
function private.test(record)
|
||||
return function(index)
|
||||
local auction_info = Aux.info.auction(index)
|
||||
local auction_info = aux.info.auction(index)
|
||||
return auction_info and auction_info.search_signature == record.search_signature
|
||||
end
|
||||
end
|
||||
@@ -458,13 +458,13 @@ do
|
||||
function private.find_auction(record)
|
||||
local search = m.current_search()
|
||||
|
||||
if not search.table:ContainsRecord(record) or Aux.is_player(record.owner) then
|
||||
if not search.table:ContainsRecord(record) or aux.is_player(record.owner) then
|
||||
return
|
||||
end
|
||||
|
||||
Aux.scan.abort(scan_id)
|
||||
aux.scan.abort(scan_id)
|
||||
state = SEARCHING
|
||||
scan_id = Aux.scan_util.find(
|
||||
scan_id = aux.scan_util.find(
|
||||
record,
|
||||
m.current_search().status_bar,
|
||||
function()
|
||||
@@ -485,10 +485,10 @@ do
|
||||
if not record.high_bidder then
|
||||
m.bid_button:SetScript('OnClick', function()
|
||||
if m.test(record)(index) and search.table:ContainsRecord(record) then
|
||||
Aux.place_bid('list', index, record.bid_price, record.bid_price < record.buyout_price and function()
|
||||
Aux.info.bid_update(record)
|
||||
aux.place_bid('list', index, record.bid_price, record.bid_price < record.buyout_price and function()
|
||||
aux.info.bid_update(record)
|
||||
search.table:SetDatabase()
|
||||
end or Aux.f(search.table.RemoveAuctionRecord, search.table, record))
|
||||
end or aux.f(search.table.RemoveAuctionRecord, search.table, record))
|
||||
end
|
||||
end)
|
||||
m.bid_button:Enable()
|
||||
@@ -497,7 +497,7 @@ do
|
||||
if record.buyout_price > 0 then
|
||||
m.buyout_button:SetScript('OnClick', function()
|
||||
if m.test(record)(index) and search.table:ContainsRecord(record) then
|
||||
Aux.place_bid('list', index, record.buyout_price, Aux.f(search.table.RemoveAuctionRecord, search.table, record))
|
||||
aux.place_bid('list', index, record.buyout_price, aux.f(search.table.RemoveAuctionRecord, search.table, record))
|
||||
end
|
||||
end)
|
||||
m.buyout_button:Enable()
|
||||
@@ -524,7 +524,7 @@ do
|
||||
elseif state == FOUND and not m.test(selection.record)(found_index) then
|
||||
m.buyout_button:Disable()
|
||||
m.bid_button:Disable()
|
||||
if not Aux.bid_in_progress() then
|
||||
if not aux.bid_in_progress() then
|
||||
state = IDLE
|
||||
end
|
||||
end
|
||||
@@ -731,12 +731,12 @@ function private.initialize_filter_dropdown()
|
||||
local function on_click()
|
||||
UIDropDownMenu_SetSelectedValue(m.filter_dropdown, this.value)
|
||||
m.filter_button:SetText(this.value)
|
||||
if (not Aux.filter.filters[this.value] or Aux.filter.filters[this.value].input_type == '') and this.value ~= 'and' and this.value ~= 'or' then
|
||||
if (not aux.filter.filters[this.value] or aux.filter.filters[this.value].input_type == '') and this.value ~= 'and' and this.value ~= 'or' then
|
||||
m.filter_input:Hide()
|
||||
else
|
||||
local _, _, suggestions = Aux.filter.parse_query_string(UIDropDownMenu_GetSelectedValue(m.filter_dropdown)..'/')
|
||||
m.filter_input:SetNumeric(not Aux.filter.filters[this.value] or Aux.filter.filters[this.value].input_type == 'number')
|
||||
m.filter_input.complete = Aux.completion.complete(function() return suggestions or {} end)
|
||||
local _, _, suggestions = aux.filter.parse_query_string(UIDropDownMenu_GetSelectedValue(m.filter_dropdown)..'/')
|
||||
m.filter_input:SetNumeric(not aux.filter.filters[this.value] or aux.filter.filters[this.value].input_type == 'number')
|
||||
m.filter_input.complete = aux.completion.complete(function() return suggestions or {} end)
|
||||
m.filter_input:Show()
|
||||
m.filter_input:SetFocus()
|
||||
end
|
||||
@@ -759,7 +759,7 @@ function private.get_form()
|
||||
end
|
||||
|
||||
local name = m.name_input:GetText()
|
||||
name = name == '' and name or Aux.filter.quote(name)
|
||||
name = name == '' and name or aux.filter.quote(name)
|
||||
add(name)
|
||||
|
||||
if m.exact_checkbox:GetChecked() then
|
||||
@@ -814,7 +814,7 @@ function private.set_form(components)
|
||||
if name and strsub(name, 1, 1) == '"' and strsub(name, -1, -1) == '"' then
|
||||
name = strsub(name, 2, -2)
|
||||
end
|
||||
m.name_input:SetText(Aux.filter.unquote(filter[2]))
|
||||
m.name_input:SetText(aux.filter.unquote(filter[2]))
|
||||
elseif filter[1] == 'exact' then
|
||||
m.exact_checkbox:SetChecked(true)
|
||||
elseif filter[1] == 'min_level' then
|
||||
@@ -824,19 +824,19 @@ function private.set_form(components)
|
||||
elseif filter[1] == 'usable' then
|
||||
m.usable_checkbox:SetChecked(true)
|
||||
elseif filter[1] == 'class' then
|
||||
class_index = Aux.info.item_class_index(filter[2])
|
||||
class_index = aux.info.item_class_index(filter[2])
|
||||
UIDropDownMenu_Initialize(m.class_dropdown, m.initialize_class_dropdown) -- TODO, wtf, why is this needed
|
||||
UIDropDownMenu_SetSelectedValue(m.class_dropdown, class_index)
|
||||
elseif filter[1] == 'subclass' then
|
||||
subclass_index = Aux.info.item_subclass_index(class_index, filter[2])
|
||||
subclass_index = aux.info.item_subclass_index(class_index, filter[2])
|
||||
UIDropDownMenu_Initialize(m.subclass_dropdown, m.initialize_subclass_dropdown) -- TODO, wtf, why is this needed
|
||||
UIDropDownMenu_SetSelectedValue(m.subclass_dropdown, subclass_index)
|
||||
elseif filter[1] == 'slot' then
|
||||
UIDropDownMenu_Initialize(m.slot_dropdown, m.initialize_slot_dropdown) -- TODO, wtf, why is this needed
|
||||
UIDropDownMenu_SetSelectedValue(m.slot_dropdown, ({GetAuctionInvTypes(class_index, subclass_index)})[Aux.info.item_slot_index(class_index, subclass_index, filter[2])])
|
||||
UIDropDownMenu_SetSelectedValue(m.slot_dropdown, ({GetAuctionInvTypes(class_index, subclass_index)})[aux.info.item_slot_index(class_index, subclass_index, filter[2])])
|
||||
elseif filter[1] == 'quality' then
|
||||
UIDropDownMenu_Initialize(m.quality_dropdown, m.initialize_quality_dropdown) -- TODO, wtf, why is this needed
|
||||
UIDropDownMenu_SetSelectedValue(m.quality_dropdown, Aux.info.item_quality_index(filter[2]))
|
||||
UIDropDownMenu_SetSelectedValue(m.quality_dropdown, aux.info.item_quality_index(filter[2]))
|
||||
end
|
||||
end
|
||||
|
||||
@@ -845,22 +845,22 @@ function private.set_form(components)
|
||||
end
|
||||
|
||||
function private.import_query_string()
|
||||
local components, error = Aux.filter.parse_query_string(({strfind(m.search_box:GetText(), '^([^;]*)')})[3])
|
||||
local components, error = aux.filter.parse_query_string(({strfind(m.search_box:GetText(), '^([^;]*)')})[3])
|
||||
if components then
|
||||
m.set_form(components)
|
||||
else
|
||||
Aux.log(error)
|
||||
aux.log(error)
|
||||
end
|
||||
end
|
||||
|
||||
function private.export_query_string()
|
||||
local components, error = Aux.filter.parse_query_string(m.get_form())
|
||||
local components, error = aux.filter.parse_query_string(m.get_form())
|
||||
if components then
|
||||
m.search_box:SetText(Aux.filter.query_string({blizzard=components.blizzard, post=m.post_components}))
|
||||
m.search_box:SetText(aux.filter.query_string({blizzard=components.blizzard, post=m.post_components}))
|
||||
m.filter_input:ClearFocus()
|
||||
m.update_filter_display()
|
||||
else
|
||||
Aux.log(error)
|
||||
aux.log(error)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -870,20 +870,20 @@ function private.add_post_component()
|
||||
local name = UIDropDownMenu_GetSelectedValue(m.filter_dropdown)
|
||||
if name then
|
||||
local filter = name
|
||||
if not Aux.filter.filters[name] and filter == 'and' or filter == 'or' then
|
||||
if not aux.filter.filters[name] and filter == 'and' or filter == 'or' then
|
||||
local arity = m.filter_input:GetText()
|
||||
arity = tonumber(arity) and Aux.util.round(tonumber(arity))
|
||||
arity = tonumber(arity) and aux.util.round(tonumber(arity))
|
||||
if arity and arity < 2 then
|
||||
Aux.log('Invalid operator suffix')
|
||||
aux.log('Invalid operator suffix')
|
||||
return
|
||||
end
|
||||
filter = filter..(arity or '')
|
||||
end
|
||||
if Aux.filter.filters[name] and Aux.filter.filters[name].input_type ~= '' then
|
||||
if aux.filter.filters[name] and aux.filter.filters[name].input_type ~= '' then
|
||||
filter = filter..'/'..m.filter_input:GetText()
|
||||
end
|
||||
|
||||
local components, error, suggestions = Aux.filter.parse_query_string(filter)
|
||||
local components, error, suggestions = aux.filter.parse_query_string(filter)
|
||||
|
||||
if components then
|
||||
tinsert(m.post_components, components.post[1])
|
||||
@@ -891,7 +891,7 @@ function private.add_post_component()
|
||||
m.filter_input:SetText('')
|
||||
m.filter_input:ClearFocus()
|
||||
else
|
||||
Aux.log(error)
|
||||
aux.log(error)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -902,10 +902,10 @@ function private.remove_post_filter()
|
||||
end
|
||||
|
||||
function private.update_filter_display()
|
||||
local lines = Aux.util.size(Aux.util.filter(m.post_components, function(component) return component[1] == 'operator' and component[2] ~= 'not' end))
|
||||
local lines = aux.util.size(aux.util.filter(m.post_components, function(component) return component[1] == 'operator' and component[2] ~= 'not' end))
|
||||
local width_scale = max(200/m.filter_display:GetStringWidth())
|
||||
local height_scale = min((200 / lines) / 18)
|
||||
m.filter_display.scale_frame:SetScale(min(1, width_scale, height_scale))
|
||||
m.filter_display:SetText(Aux.filter.indented_post_query_string(m.post_components))
|
||||
m.filter_display:SetText(aux.filter.indented_post_query_string(m.post_components))
|
||||
end
|
||||
|
||||
|
||||
+73
-73
@@ -1,29 +1,29 @@
|
||||
Aux.search_tab.FRAMES(function(m, public, private)
|
||||
aux.search_tab.FRAMES(function(m, public, private)
|
||||
private.frame = CreateFrame('Frame', nil, AuxFrame)
|
||||
m.frame:SetAllPoints()
|
||||
m.frame:SetScript('OnUpdate', m.on_update)
|
||||
m.frame:Hide()
|
||||
|
||||
m.frame.filter = Aux.gui.panel(m.frame)
|
||||
m.frame.filter = aux.gui.panel(m.frame)
|
||||
m.frame.filter:SetAllPoints(AuxFrameContent)
|
||||
|
||||
m.frame.results = Aux.gui.panel(m.frame)
|
||||
m.frame.results = aux.gui.panel(m.frame)
|
||||
m.frame.results:SetAllPoints(AuxFrameContent)
|
||||
|
||||
m.frame.saved = CreateFrame('Frame', nil, m.frame)
|
||||
m.frame.saved:SetAllPoints(AuxFrameContent)
|
||||
|
||||
m.frame.saved.favorite = Aux.gui.panel(m.frame.saved)
|
||||
m.frame.saved.favorite = aux.gui.panel(m.frame.saved)
|
||||
m.frame.saved.favorite:SetWidth(378.5)
|
||||
m.frame.saved.favorite:SetPoint('TOPLEFT', 0, 0)
|
||||
m.frame.saved.favorite:SetPoint('BOTTOMLEFT', 0, 0)
|
||||
|
||||
m.frame.saved.recent = Aux.gui.panel(m.frame.saved)
|
||||
m.frame.saved.recent = aux.gui.panel(m.frame.saved)
|
||||
m.frame.saved.recent:SetWidth(378.5)
|
||||
m.frame.saved.recent:SetPoint('TOPRIGHT', 0, 0)
|
||||
m.frame.saved.recent:SetPoint('BOTTOMRIGHT', 0, 0)
|
||||
do
|
||||
local btn = Aux.gui.button(m.frame)
|
||||
local btn = aux.gui.button(m.frame)
|
||||
btn:SetPoint('TOPLEFT', 0, 0)
|
||||
btn:SetWidth(42)
|
||||
btn:SetHeight(42)
|
||||
@@ -50,7 +50,7 @@ Aux.search_tab.FRAMES(function(m, public, private)
|
||||
do
|
||||
local panel = CreateFrame('Frame', nil, m.frame)
|
||||
panel:SetBackdrop{bgFile=[[Interface\Buttons\WHITE8X8]]}
|
||||
panel:SetBackdropColor(unpack(Aux.gui.config.content_color.backdrop))
|
||||
panel:SetBackdropColor(unpack(aux.gui.config.content_color.backdrop))
|
||||
panel:SetPoint('LEFT', m.settings_button, 'RIGHT', 0, 0)
|
||||
panel:SetPoint('RIGHT', 0, 0)
|
||||
panel:SetHeight(42)
|
||||
@@ -65,7 +65,7 @@ Aux.search_tab.FRAMES(function(m, public, private)
|
||||
private.controls = panel
|
||||
end
|
||||
do
|
||||
local editbox = Aux.gui.editbox(m.settings)
|
||||
local editbox = aux.gui.editbox(m.settings)
|
||||
editbox:SetPoint('LEFT', 75, 0)
|
||||
editbox:SetWidth(50)
|
||||
editbox:SetNumeric(true)
|
||||
@@ -79,19 +79,19 @@ Aux.search_tab.FRAMES(function(m, public, private)
|
||||
end)
|
||||
editbox:SetScript('OnTextChanged', function()
|
||||
if m.blizzard_page_index(this:GetText()) and not m.real_time_button:GetChecked() then
|
||||
this:SetBackdropColor(unpack(Aux.gui.config.on_color))
|
||||
this:SetBackdropColor(unpack(aux.gui.config.on_color))
|
||||
else
|
||||
this:SetBackdropColor(unpack(Aux.gui.config.off_color))
|
||||
this:SetBackdropColor(unpack(aux.gui.config.off_color))
|
||||
end
|
||||
end)
|
||||
local label = Aux.gui.label(editbox, Aux.gui.config.medium_font_size)
|
||||
local label = aux.gui.label(editbox, aux.gui.config.medium_font_size)
|
||||
label:SetPoint('RIGHT', editbox, 'LEFT', -6, 0)
|
||||
label:SetText('Pages')
|
||||
label:SetTextColor(unpack(Aux.gui.config.text_color.enabled))
|
||||
label:SetTextColor(unpack(aux.gui.config.text_color.enabled))
|
||||
private.first_page_input = editbox
|
||||
end
|
||||
do
|
||||
local editbox = Aux.gui.editbox(m.settings)
|
||||
local editbox = aux.gui.editbox(m.settings)
|
||||
editbox:SetPoint('LEFT', m.first_page_input, 'RIGHT', 10, 0)
|
||||
editbox:SetWidth(50)
|
||||
editbox:SetNumeric(true)
|
||||
@@ -105,19 +105,19 @@ Aux.search_tab.FRAMES(function(m, public, private)
|
||||
end)
|
||||
editbox:SetScript('OnTextChanged', function()
|
||||
if m.blizzard_page_index(this:GetText()) and not m.real_time_button:GetChecked() then
|
||||
this:SetBackdropColor(unpack(Aux.gui.config.on_color))
|
||||
this:SetBackdropColor(unpack(aux.gui.config.on_color))
|
||||
else
|
||||
this:SetBackdropColor(unpack(Aux.gui.config.off_color))
|
||||
this:SetBackdropColor(unpack(aux.gui.config.off_color))
|
||||
end
|
||||
end)
|
||||
local label = Aux.gui.label(editbox, Aux.gui.config.medium_font_size)
|
||||
local label = aux.gui.label(editbox, aux.gui.config.medium_font_size)
|
||||
label:SetPoint('RIGHT', editbox, 'LEFT', -3.5, 0)
|
||||
label:SetText('-')
|
||||
label:SetTextColor(unpack(Aux.gui.config.text_color.enabled))
|
||||
label:SetTextColor(unpack(aux.gui.config.text_color.enabled))
|
||||
private.last_page_input = editbox
|
||||
end
|
||||
do
|
||||
local btn = Aux.gui.checkbutton(m.settings)
|
||||
local btn = aux.gui.checkbutton(m.settings)
|
||||
btn:SetPoint('LEFT', 230, 0)
|
||||
btn:SetWidth(140)
|
||||
btn:SetHeight(25)
|
||||
@@ -132,7 +132,7 @@ Aux.search_tab.FRAMES(function(m, public, private)
|
||||
public.real_time_button = btn
|
||||
end
|
||||
do
|
||||
local btn = Aux.gui.checkbutton(m.settings)
|
||||
local btn = aux.gui.checkbutton(m.settings)
|
||||
btn:SetPoint('LEFT', m.real_time_button, 'RIGHT', 15, 0)
|
||||
btn:SetWidth(140)
|
||||
btn:SetHeight(25)
|
||||
@@ -147,7 +147,7 @@ Aux.search_tab.FRAMES(function(m, public, private)
|
||||
private.auto_buy_button = btn
|
||||
end
|
||||
do
|
||||
local btn = Aux.gui.checkbutton(m.settings)
|
||||
local btn = aux.gui.checkbutton(m.settings)
|
||||
btn:SetPoint('LEFT', m.auto_buy_button, 'RIGHT', 15, 0)
|
||||
btn:SetWidth(140)
|
||||
btn:SetHeight(25)
|
||||
@@ -175,7 +175,7 @@ Aux.search_tab.FRAMES(function(m, public, private)
|
||||
private.auto_buy_filter_button = btn
|
||||
end
|
||||
do
|
||||
local btn = Aux.gui.button(m.controls, 25)
|
||||
local btn = aux.gui.button(m.controls, 25)
|
||||
btn:SetPoint('LEFT', 5, 0)
|
||||
btn:SetWidth(30)
|
||||
btn:SetHeight(25)
|
||||
@@ -184,7 +184,7 @@ Aux.search_tab.FRAMES(function(m, public, private)
|
||||
private.previous_button = btn
|
||||
end
|
||||
do
|
||||
local btn = Aux.gui.button(m.controls, 25)
|
||||
local btn = aux.gui.button(m.controls, 25)
|
||||
btn:SetPoint('LEFT', m.previous_button, 'RIGHT', 4, 0)
|
||||
btn:SetWidth(30)
|
||||
btn:SetHeight(25)
|
||||
@@ -193,7 +193,7 @@ Aux.search_tab.FRAMES(function(m, public, private)
|
||||
private.next_button = btn
|
||||
end
|
||||
do
|
||||
local btn = Aux.gui.button(m.controls, Aux.gui.config.huge_font_size)
|
||||
local btn = aux.gui.button(m.controls, aux.gui.config.huge_font_size)
|
||||
btn:SetPoint('RIGHT', -5, 0)
|
||||
btn:SetWidth(70)
|
||||
btn:SetHeight(25)
|
||||
@@ -208,19 +208,19 @@ Aux.search_tab.FRAMES(function(m, public, private)
|
||||
private.start_button = btn
|
||||
end
|
||||
do
|
||||
local btn = Aux.gui.button(m.controls, Aux.gui.config.huge_font_size)
|
||||
local btn = aux.gui.button(m.controls, aux.gui.config.huge_font_size)
|
||||
btn:SetPoint('RIGHT', -5, 0)
|
||||
btn:SetWidth(70)
|
||||
btn:SetHeight(25)
|
||||
btn:SetText('Stop')
|
||||
btn:SetScript('OnClick', function()
|
||||
Aux.scan.abort(m.search_scan_id)
|
||||
aux.scan.abort(m.search_scan_id)
|
||||
end)
|
||||
btn:Hide()
|
||||
private.stop_button = btn
|
||||
end
|
||||
do
|
||||
local btn = Aux.gui.button(m.controls, Aux.gui.config.huge_font_size)
|
||||
local btn = aux.gui.button(m.controls, aux.gui.config.huge_font_size)
|
||||
btn:SetPoint('RIGHT', m.start_button, 'LEFT', -4, 0)
|
||||
btn:SetWidth(70)
|
||||
btn:SetHeight(25)
|
||||
@@ -231,10 +231,10 @@ Aux.search_tab.FRAMES(function(m, public, private)
|
||||
private.resume_button = btn
|
||||
end
|
||||
do
|
||||
local editbox = Aux.gui.editbox(m.controls)
|
||||
local editbox = aux.gui.editbox(m.controls)
|
||||
editbox:SetMaxLetters(nil)
|
||||
editbox:EnableMouse(1)
|
||||
editbox.complete = Aux.completion.complete_filter
|
||||
editbox.complete = aux.completion.complete_filter
|
||||
editbox:SetPoint('RIGHT', m.start_button, 'LEFT', -4, 0)
|
||||
editbox:SetHeight(25)
|
||||
editbox:SetScript('OnChar', function()
|
||||
@@ -245,7 +245,7 @@ Aux.search_tab.FRAMES(function(m, public, private)
|
||||
end)
|
||||
editbox:SetScript('OnEnterPressed', m.execute)
|
||||
editbox:SetScript('OnReceiveDrag', function()
|
||||
local item_info = Aux.cursor_item() and Aux.info.item(Aux.cursor_item().item_id)
|
||||
local item_info = aux.cursor_item() and aux.info.item(aux.cursor_item().item_id)
|
||||
if item_info then
|
||||
m.set_filter(strlower(item_info.name)..'/exact')
|
||||
m.execute(nil, false)
|
||||
@@ -255,10 +255,10 @@ Aux.search_tab.FRAMES(function(m, public, private)
|
||||
private.search_box = editbox
|
||||
end
|
||||
do
|
||||
Aux.gui.horizontal_line(m.frame, -40)
|
||||
aux.gui.horizontal_line(m.frame, -40)
|
||||
end
|
||||
do
|
||||
local btn = Aux.gui.button(m.frame, Aux.gui.config.large_font_size)
|
||||
local btn = aux.gui.button(m.frame, aux.gui.config.large_font_size)
|
||||
btn:SetPoint('BOTTOMLEFT', AuxFrameContent, 'TOPLEFT', 10, 8)
|
||||
btn:SetWidth(243)
|
||||
btn:SetHeight(22)
|
||||
@@ -267,7 +267,7 @@ Aux.search_tab.FRAMES(function(m, public, private)
|
||||
private.search_results_button = btn
|
||||
end
|
||||
do
|
||||
local btn = Aux.gui.button(m.frame, Aux.gui.config.large_font_size)
|
||||
local btn = aux.gui.button(m.frame, aux.gui.config.large_font_size)
|
||||
btn:SetPoint('TOPLEFT', m.search_results_button, 'TOPRIGHT', 5, 0)
|
||||
btn:SetWidth(243)
|
||||
btn:SetHeight(22)
|
||||
@@ -276,7 +276,7 @@ Aux.search_tab.FRAMES(function(m, public, private)
|
||||
private.saved_searches_button = btn
|
||||
end
|
||||
do
|
||||
local btn = Aux.gui.button(m.frame, Aux.gui.config.large_font_size)
|
||||
local btn = aux.gui.button(m.frame, aux.gui.config.large_font_size)
|
||||
btn:SetPoint('TOPLEFT', m.saved_searches_button, 'TOPRIGHT', 5, 0)
|
||||
btn:SetWidth(243)
|
||||
btn:SetHeight(22)
|
||||
@@ -292,7 +292,7 @@ Aux.search_tab.FRAMES(function(m, public, private)
|
||||
private.status_bar_frame = frame
|
||||
end
|
||||
do
|
||||
local btn = Aux.gui.button(m.frame.results, 16)
|
||||
local btn = aux.gui.button(m.frame.results, 16)
|
||||
btn:SetPoint('TOPLEFT', m.status_bar_frame, 'TOPRIGHT', 5, 0)
|
||||
btn:SetWidth(80)
|
||||
btn:SetHeight(24)
|
||||
@@ -301,7 +301,7 @@ Aux.search_tab.FRAMES(function(m, public, private)
|
||||
private.bid_button = btn
|
||||
end
|
||||
do
|
||||
local btn = Aux.gui.button(m.frame.results, 16)
|
||||
local btn = aux.gui.button(m.frame.results, 16)
|
||||
btn:SetPoint('TOPLEFT', m.bid_button, 'TOPRIGHT', 5, 0)
|
||||
btn:SetWidth(80)
|
||||
btn:SetHeight(24)
|
||||
@@ -310,7 +310,7 @@ Aux.search_tab.FRAMES(function(m, public, private)
|
||||
private.buyout_button = btn
|
||||
end
|
||||
do
|
||||
local btn = Aux.gui.button(m.frame.results, 16)
|
||||
local btn = aux.gui.button(m.frame.results, 16)
|
||||
btn:SetPoint('TOPLEFT', m.buyout_button, 'TOPRIGHT', 5, 0)
|
||||
btn:SetWidth(80)
|
||||
btn:SetHeight(24)
|
||||
@@ -321,24 +321,24 @@ Aux.search_tab.FRAMES(function(m, public, private)
|
||||
end)
|
||||
end
|
||||
do
|
||||
local btn = Aux.gui.button(m.frame.saved, 16)
|
||||
local btn = aux.gui.button(m.frame.saved, 16)
|
||||
btn:SetPoint('TOPLEFT', m.status_bar_frame, 'TOPRIGHT', 5, 0)
|
||||
btn:SetWidth(80)
|
||||
btn:SetHeight(24)
|
||||
btn:SetText('Favorite')
|
||||
btn:SetScript('OnClick', function()
|
||||
local filters = Aux.filter.queries(m.search_box:GetText())
|
||||
local filters = aux.filter.queries(m.search_box:GetText())
|
||||
if filters then
|
||||
tinsert(aux_favorite_searches, 1, {
|
||||
filter_string = m.search_box:GetText(),
|
||||
prettified = Aux.util.join(Aux.util.map(filters, function(filter) return filter.prettified end), ';'),
|
||||
prettified = aux.util.join(aux.util.map(filters, function(filter) return filter.prettified end), ';'),
|
||||
})
|
||||
end
|
||||
m.update_search_listings()
|
||||
end)
|
||||
end
|
||||
do
|
||||
local btn1 = Aux.gui.button(m.frame.filter, 16)
|
||||
local btn1 = aux.gui.button(m.frame.filter, 16)
|
||||
btn1:SetPoint('TOPLEFT', m.status_bar_frame, 'TOPRIGHT', 5, 0)
|
||||
btn1:SetWidth(80)
|
||||
btn1:SetHeight(24)
|
||||
@@ -348,14 +348,14 @@ Aux.search_tab.FRAMES(function(m, public, private)
|
||||
m.execute()
|
||||
end)
|
||||
|
||||
local btn2 = Aux.gui.button(m.frame.filter, 16)
|
||||
local btn2 = aux.gui.button(m.frame.filter, 16)
|
||||
btn2:SetPoint('LEFT', btn1, 'RIGHT', 5, 0)
|
||||
btn2:SetWidth(80)
|
||||
btn2:SetHeight(24)
|
||||
btn2:SetText('Export')
|
||||
btn2:SetScript('OnClick', m.export_query_string)
|
||||
|
||||
local btn3 = Aux.gui.button(m.frame.filter, 16)
|
||||
local btn3 = aux.gui.button(m.frame.filter, 16)
|
||||
btn3:SetPoint('LEFT', btn2, 'RIGHT', 5, 0)
|
||||
btn3:SetWidth(80)
|
||||
btn3:SetHeight(24)
|
||||
@@ -363,8 +363,8 @@ Aux.search_tab.FRAMES(function(m, public, private)
|
||||
btn3:SetScript('OnClick', m.import_query_string)
|
||||
end
|
||||
do
|
||||
local editbox = Aux.gui.editbox(m.frame.filter)
|
||||
editbox.complete_item = Aux.completion.complete(function() return aux_auctionable_items end)
|
||||
local editbox = aux.gui.editbox(m.frame.filter)
|
||||
editbox.complete_item = aux.completion.complete(function() return aux_auctionable_items end)
|
||||
editbox:SetPoint('TOPLEFT', 14, -26)
|
||||
editbox:SetWidth(260)
|
||||
editbox:SetScript('OnChar', function()
|
||||
@@ -379,8 +379,8 @@ Aux.search_tab.FRAMES(function(m, public, private)
|
||||
m.min_level_input:SetFocus()
|
||||
end
|
||||
end)
|
||||
editbox:SetScript('OnEnterPressed', Aux.f(editbox.ClearFocus, editbox))
|
||||
local label = Aux.gui.label(editbox, Aux.gui.config.small_font_size)
|
||||
editbox:SetScript('OnEnterPressed', aux.f(editbox.ClearFocus, editbox))
|
||||
local label = aux.gui.label(editbox, aux.gui.config.small_font_size)
|
||||
label:SetPoint('BOTTOMLEFT', editbox, 'TOPLEFT', -2, 1)
|
||||
label:SetText('Name')
|
||||
private.name_input = editbox
|
||||
@@ -390,13 +390,13 @@ Aux.search_tab.FRAMES(function(m, public, private)
|
||||
checkbox:SetWidth(22)
|
||||
checkbox:SetHeight(22)
|
||||
checkbox:SetPoint('TOPLEFT', m.name_input, 'TOPRIGHT', 10, 0)
|
||||
local label = Aux.gui.label(checkbox, Aux.gui.config.small_font_size)
|
||||
local label = aux.gui.label(checkbox, aux.gui.config.small_font_size)
|
||||
label:SetPoint('BOTTOMLEFT', checkbox, 'TOPLEFT', 1, -3)
|
||||
label:SetText('Exact')
|
||||
private.exact_checkbox = checkbox
|
||||
end
|
||||
do
|
||||
local editbox = Aux.gui.editbox(m.frame.filter)
|
||||
local editbox = aux.gui.editbox(m.frame.filter)
|
||||
editbox:SetPoint('TOPLEFT', m.name_input, 'BOTTOMLEFT', 0, -28)
|
||||
editbox:SetWidth(125)
|
||||
editbox:SetNumeric(true)
|
||||
@@ -408,14 +408,14 @@ Aux.search_tab.FRAMES(function(m, public, private)
|
||||
m.max_level_input:SetFocus()
|
||||
end
|
||||
end)
|
||||
editbox:SetScript('OnEnterPressed', Aux.f(editbox.ClearFocus, editbox))
|
||||
local label = Aux.gui.label(editbox, Aux.gui.config.small_font_size)
|
||||
editbox:SetScript('OnEnterPressed', aux.f(editbox.ClearFocus, editbox))
|
||||
local label = aux.gui.label(editbox, aux.gui.config.small_font_size)
|
||||
label:SetPoint('BOTTOMLEFT', editbox, 'TOPLEFT', -2, 1)
|
||||
label:SetText('Level Range')
|
||||
private.min_level_input = editbox
|
||||
end
|
||||
do
|
||||
local editbox = Aux.gui.editbox(m.frame.filter)
|
||||
local editbox = aux.gui.editbox(m.frame.filter)
|
||||
editbox:SetPoint('TOPLEFT', m.min_level_input, 'TOPRIGHT', 10, 0)
|
||||
editbox:SetWidth(125)
|
||||
editbox:SetNumeric(true)
|
||||
@@ -427,8 +427,8 @@ Aux.search_tab.FRAMES(function(m, public, private)
|
||||
m.name_input:SetFocus()
|
||||
end
|
||||
end)
|
||||
editbox:SetScript('OnEnterPressed', Aux.f(editbox.ClearFocus, editbox))
|
||||
local label = Aux.gui.label(editbox, Aux.gui.config.medium_font_size)
|
||||
editbox:SetScript('OnEnterPressed', aux.f(editbox.ClearFocus, editbox))
|
||||
local label = aux.gui.label(editbox, aux.gui.config.medium_font_size)
|
||||
label:SetPoint('RIGHT', editbox, 'LEFT', -3, 0)
|
||||
label:SetText('-')
|
||||
private.max_level_input = editbox
|
||||
@@ -438,17 +438,17 @@ Aux.search_tab.FRAMES(function(m, public, private)
|
||||
checkbox:SetWidth(22)
|
||||
checkbox:SetHeight(22)
|
||||
checkbox:SetPoint('TOPLEFT', m.max_level_input, 'TOPRIGHT', 10, 0)
|
||||
local label = Aux.gui.label(checkbox, Aux.gui.config.small_font_size)
|
||||
local label = aux.gui.label(checkbox, aux.gui.config.small_font_size)
|
||||
label:SetPoint('BOTTOMLEFT', checkbox, 'TOPLEFT', 1, -3)
|
||||
label:SetText('Usable')
|
||||
private.usable_checkbox = checkbox
|
||||
end
|
||||
do
|
||||
local dropdown = Aux.gui.dropdown(m.frame.filter)
|
||||
local dropdown = aux.gui.dropdown(m.frame.filter)
|
||||
dropdown:SetPoint('TOPLEFT', m.min_level_input, 'BOTTOMLEFT', 0, -26)
|
||||
dropdown:SetWidth(300)
|
||||
dropdown:SetHeight(10)
|
||||
local label = Aux.gui.label(dropdown, Aux.gui.config.small_font_size)
|
||||
local label = aux.gui.label(dropdown, aux.gui.config.small_font_size)
|
||||
label:SetPoint('BOTTOMLEFT', dropdown, 'TOPLEFT', -2, -4)
|
||||
label:SetText('Item Class')
|
||||
UIDropDownMenu_Initialize(dropdown, m.initialize_class_dropdown)
|
||||
@@ -458,11 +458,11 @@ Aux.search_tab.FRAMES(function(m, public, private)
|
||||
private.class_dropdown = dropdown
|
||||
end
|
||||
do
|
||||
local dropdown = Aux.gui.dropdown(m.frame.filter)
|
||||
local dropdown = aux.gui.dropdown(m.frame.filter)
|
||||
dropdown:SetPoint('TOPLEFT', m.class_dropdown, 'BOTTOMLEFT', 0, -22)
|
||||
dropdown:SetWidth(300)
|
||||
dropdown:SetHeight(10)
|
||||
local label = Aux.gui.label(dropdown, Aux.gui.config.small_font_size)
|
||||
local label = aux.gui.label(dropdown, aux.gui.config.small_font_size)
|
||||
label:SetPoint('BOTTOMLEFT', dropdown, 'TOPLEFT', -2, -4)
|
||||
label:SetText('Item Subclass')
|
||||
UIDropDownMenu_Initialize(dropdown, m.initialize_subclass_dropdown)
|
||||
@@ -472,11 +472,11 @@ Aux.search_tab.FRAMES(function(m, public, private)
|
||||
private.subclass_dropdown = dropdown
|
||||
end
|
||||
do
|
||||
local dropdown = Aux.gui.dropdown(m.frame.filter)
|
||||
local dropdown = aux.gui.dropdown(m.frame.filter)
|
||||
dropdown:SetPoint('TOPLEFT', m.subclass_dropdown, 'BOTTOMLEFT', 0, -22)
|
||||
dropdown:SetWidth(300)
|
||||
dropdown:SetHeight(10)
|
||||
local label = Aux.gui.label(dropdown, Aux.gui.config.small_font_size)
|
||||
local label = aux.gui.label(dropdown, aux.gui.config.small_font_size)
|
||||
label:SetPoint('BOTTOMLEFT', dropdown, 'TOPLEFT', -2, -4)
|
||||
label:SetText('Item Slot')
|
||||
UIDropDownMenu_Initialize(dropdown, m.initialize_slot_dropdown)
|
||||
@@ -486,11 +486,11 @@ Aux.search_tab.FRAMES(function(m, public, private)
|
||||
private.slot_dropdown = dropdown
|
||||
end
|
||||
do
|
||||
local dropdown = Aux.gui.dropdown(m.frame.filter)
|
||||
local dropdown = aux.gui.dropdown(m.frame.filter)
|
||||
dropdown:SetPoint('TOPLEFT', m.slot_dropdown, 'BOTTOMLEFT', 0, -22)
|
||||
dropdown:SetWidth(300)
|
||||
dropdown:SetHeight(10)
|
||||
local label = Aux.gui.label(dropdown, Aux.gui.config.small_font_size)
|
||||
local label = aux.gui.label(dropdown, aux.gui.config.small_font_size)
|
||||
label:SetPoint('BOTTOMLEFT', dropdown, 'TOPLEFT', -2, -4)
|
||||
label:SetText('Min Rarity')
|
||||
UIDropDownMenu_Initialize(dropdown, m.initialize_quality_dropdown)
|
||||
@@ -499,9 +499,9 @@ Aux.search_tab.FRAMES(function(m, public, private)
|
||||
end)
|
||||
private.quality_dropdown = dropdown
|
||||
end
|
||||
Aux.gui.vertical_line(m.frame.filter, 332)
|
||||
aux.gui.vertical_line(m.frame.filter, 332)
|
||||
do
|
||||
local dropdown = Aux.gui.dropdown(m.frame.filter)
|
||||
local dropdown = aux.gui.dropdown(m.frame.filter)
|
||||
dropdown:SetPoint('TOPRIGHT', -177, -10)
|
||||
dropdown:SetWidth(150)
|
||||
dropdown:SetHeight(10)
|
||||
@@ -510,13 +510,13 @@ Aux.search_tab.FRAMES(function(m, public, private)
|
||||
UIDropDownMenu_Initialize(this, m.initialize_filter_dropdown)
|
||||
end)
|
||||
getglobal(dropdown:GetName()..'Text'):Hide()
|
||||
local label = Aux.gui.label(dropdown, Aux.gui.config.medium_font_size)
|
||||
local label = aux.gui.label(dropdown, aux.gui.config.medium_font_size)
|
||||
label:SetPoint('RIGHT', dropdown, 'LEFT', -15, 0)
|
||||
label:SetText('Post Filter')
|
||||
private.filter_dropdown = dropdown
|
||||
end
|
||||
do
|
||||
local btn = Aux.gui.button(m.frame.filter, 16)
|
||||
local btn = aux.gui.button(m.frame.filter, 16)
|
||||
btn:SetWidth(150)
|
||||
btn:SetHeight(25)
|
||||
btn:SetPoint('CENTER', m.filter_dropdown, 'CENTER', 0, 0)
|
||||
@@ -531,7 +531,7 @@ Aux.search_tab.FRAMES(function(m, public, private)
|
||||
private.filter_button = btn
|
||||
end
|
||||
do
|
||||
local input = Aux.gui.editbox(m.frame.filter)
|
||||
local input = aux.gui.editbox(m.frame.filter)
|
||||
input:SetPoint('LEFT', m.filter_dropdown, 'RIGHT', 10, 0)
|
||||
input:SetWidth(150)
|
||||
input:SetHeight(25)
|
||||
@@ -547,10 +547,10 @@ Aux.search_tab.FRAMES(function(m, public, private)
|
||||
frame:SetWidth(395)
|
||||
frame:SetHeight(270)
|
||||
frame:SetPoint('TOPLEFT', 348, -50)
|
||||
Aux.gui.set_content_style(frame)
|
||||
aux.gui.set_content_style(frame)
|
||||
local scale_frame = CreateFrame('Frame', nil, frame)
|
||||
scale_frame:SetAllPoints()
|
||||
local display = Aux.gui.label(scale_frame, Aux.gui.config.large_font_size)
|
||||
local display = aux.gui.label(scale_frame, aux.gui.config.large_font_size)
|
||||
display:SetAllPoints()
|
||||
display:SetJustifyH('LEFT')
|
||||
display:SetJustifyV('TOP')
|
||||
@@ -561,12 +561,12 @@ Aux.search_tab.FRAMES(function(m, public, private)
|
||||
private.status_bars = {}
|
||||
private.tables = {}
|
||||
for _=1,5 do
|
||||
local status_bar = Aux.gui.status_bar(m.frame)
|
||||
local status_bar = aux.gui.status_bar(m.frame)
|
||||
status_bar:SetAllPoints(m.status_bar_frame)
|
||||
status_bar:Hide()
|
||||
tinsert(m.status_bars, status_bar)
|
||||
|
||||
local table = Aux.auction_listing.CreateAuctionResultsTable(m.frame.results, Aux.auction_listing.search_config)
|
||||
local table = aux.auction_listing.CreateAuctionResultsTable(m.frame.results, aux.auction_listing.search_config)
|
||||
table:SetHandler('OnCellClick', function(cell, button)
|
||||
if IsAltKeyDown() and m.current_search().table:GetSelection().record == cell.row.data.record then
|
||||
if button == 'LeftButton' and m.buyout_button:IsEnabled() then
|
||||
@@ -629,7 +629,7 @@ Aux.search_tab.FRAMES(function(m, public, private)
|
||||
end
|
||||
}
|
||||
|
||||
private.recent_searches_listing = Aux.listing.CreateScrollingTable(m.frame.saved.recent)
|
||||
private.recent_searches_listing = aux.listing.CreateScrollingTable(m.frame.saved.recent)
|
||||
m.recent_searches_listing:SetColInfo({{name='Recent Searches', width=1}})
|
||||
m.recent_searches_listing:EnableSorting(false)
|
||||
m.recent_searches_listing:DisableSelection(true)
|
||||
@@ -637,7 +637,7 @@ Aux.search_tab.FRAMES(function(m, public, private)
|
||||
m.recent_searches_listing:SetHandler('OnEnter', handlers.OnEnter)
|
||||
m.recent_searches_listing:SetHandler('OnLeave', handlers.OnLeave)
|
||||
|
||||
private.favorite_searches_listing = Aux.listing.CreateScrollingTable(m.frame.saved.favorite)
|
||||
private.favorite_searches_listing = aux.listing.CreateScrollingTable(m.frame.saved.favorite)
|
||||
m.favorite_searches_listing:SetColInfo({{name='Favorite Searches', width=1}})
|
||||
m.favorite_searches_listing:EnableSorting(false)
|
||||
m.favorite_searches_listing:DisableSelection(true)
|
||||
|
||||
Reference in New Issue
Block a user