add / option to always show hidden items and check if received value is nil
This commit is contained in:
+7
-5
@@ -86,12 +86,14 @@ AUX_data_sharer:SetScript("OnEvent", function()
|
|||||||
if msg == "AuxData" then
|
if msg == "AuxData" then
|
||||||
if arg2 ~= AUXplayerName then
|
if arg2 ~= AUXplayerName then
|
||||||
local unit_buyout_price = tonumber (munit_buyout_price)
|
local unit_buyout_price = tonumber (munit_buyout_price)
|
||||||
|
if unit_buyout_price then
|
||||||
--print("received data:" .. msg .. "," .. item_key .. "," .. unit_buyout_price); --for testing (print comes from PFUI)
|
--print("received data:" .. msg .. "," .. item_key .. "," .. unit_buyout_price); --for testing (print comes from PFUI)
|
||||||
local item_record = read_record(item_key)
|
local item_record = read_record(item_key)
|
||||||
if unit_buyout_price > 0 and unit_buyout_price < (item_record.daily_min_buyout or aux.huge) then
|
if unit_buyout_price > 0 and unit_buyout_price < (item_record.daily_min_buyout or aux.huge) then
|
||||||
item_record.daily_min_buyout = unit_buyout_price
|
item_record.daily_min_buyout = unit_buyout_price
|
||||||
write_record(item_key, item_record)
|
write_record(item_key, item_record)
|
||||||
--print("wrote data"); --for testing (print comes from PFUI)
|
--print("wrote data"); --for testing (print comes from PFUI)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -61,6 +61,9 @@ function SlashCmdList.AUX(command)
|
|||||||
elseif arguments[1] == 'sharing' then
|
elseif arguments[1] == 'sharing' then
|
||||||
aux.account_data.sharing = not aux.account_data.sharing
|
aux.account_data.sharing = not aux.account_data.sharing
|
||||||
aux.print('sharing ' .. status(aux.account_data.sharing))
|
aux.print('sharing ' .. status(aux.account_data.sharing))
|
||||||
|
elseif arguments[1] == 'show' and arguments[2] == 'hidden' then
|
||||||
|
aux.account_data.showhidden = not aux.account_data.showhidden
|
||||||
|
aux.print('show hidden ' .. status(aux.account_data.showhidden))
|
||||||
else
|
else
|
||||||
aux.print('Usage:')
|
aux.print('Usage:')
|
||||||
aux.print('- scale [' .. aux.color.blue(aux.account_data.scale) .. ']')
|
aux.print('- scale [' .. aux.color.blue(aux.account_data.scale) .. ']')
|
||||||
@@ -78,5 +81,6 @@ function SlashCmdList.AUX(command)
|
|||||||
aux.print('- clear item cache')
|
aux.print('- clear item cache')
|
||||||
aux.print('- populate wdb')
|
aux.print('- populate wdb')
|
||||||
aux.print('- sharing [' .. status(aux.account_data.sharing) .. ']')
|
aux.print('- sharing [' .. status(aux.account_data.sharing) .. ']')
|
||||||
|
aux.print('- show hidden [' .. status(aux.account_data.showhidden) .. ']')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
+3
-1
@@ -103,7 +103,7 @@ end
|
|||||||
function update_inventory_listing()
|
function update_inventory_listing()
|
||||||
local records = aux.values(aux.filter(aux.copy(inventory_records), function(record)
|
local records = aux.values(aux.filter(aux.copy(inventory_records), function(record)
|
||||||
local settings = read_settings(record.key)
|
local settings = read_settings(record.key)
|
||||||
return record.aux_quantity > 0 and (not settings.hidden or show_hidden_checkbox:GetChecked())
|
return record.aux_quantity > 0 and (not settings.hidden or show_hidden_checkbox:GetChecked() or aux.account_data.showhidden)
|
||||||
end))
|
end))
|
||||||
sort(records, function(a, b) return a.name < b.name end)
|
sort(records, function(a, b) return a.name < b.name end)
|
||||||
item_listing.populate(inventory_listing, records)
|
item_listing.populate(inventory_listing, records)
|
||||||
@@ -205,6 +205,7 @@ function post_auctions()
|
|||||||
stack_count = stack_count_slider:GetValue()
|
stack_count = stack_count_slider:GetValue()
|
||||||
local duration = UIDropDownMenu_GetSelectedValue(duration_dropdown)
|
local duration = UIDropDownMenu_GetSelectedValue(duration_dropdown)
|
||||||
local key = selected_item.key
|
local key = selected_item.key
|
||||||
|
print(duration)
|
||||||
|
|
||||||
local duration_code
|
local duration_code
|
||||||
if duration == DURATION_2 then
|
if duration == DURATION_2 then
|
||||||
@@ -601,6 +602,7 @@ function initialize_duration_dropdown()
|
|||||||
UIDropDownMenu_SetSelectedValue(duration_dropdown, this.value)
|
UIDropDownMenu_SetSelectedValue(duration_dropdown, this.value)
|
||||||
local settings = read_settings()
|
local settings = read_settings()
|
||||||
settings.duration = this.value
|
settings.duration = this.value
|
||||||
|
print(this.value)
|
||||||
write_settings(settings)
|
write_settings(settings)
|
||||||
refresh = true
|
refresh = true
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user