fix pages
This commit is contained in:
+16
-18
@@ -100,25 +100,23 @@ AUX_data_sharer:SetScript("OnEvent", function()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
function M.process_auction(auction_record, pages)
|
function M.process_auction(auction_record, pages)
|
||||||
local item_record = read_record(auction_record.item_key)
|
local item_record = read_record(auction_record.item_key)
|
||||||
local unit_buyout_price = ceil(auction_record.buyout_price / auction_record.aux_quantity)
|
local unit_buyout_price = ceil(auction_record.buyout_price / auction_record.aux_quantity)
|
||||||
local item_key = auction_record.item_key
|
local item_key = auction_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(auction_record.item_key, item_record)
|
write_record(auction_record.item_key, item_record)
|
||||||
--AuxAddon:SendCommMessage("GUILD", item_key, unit_buyout_price) relies on acecomm
|
--AuxAddon:SendCommMessage("GUILD", item_key, unit_buyout_price) relies on acecomm
|
||||||
if aux.account_data.sharing == true then
|
if aux.account_data.sharing == true then
|
||||||
if pages == nil or pages < 15 then --sometimes pages is nil, not entirely sure why but we'll assume it's nothing worrying xd NVM it does seem bad, need to investigate
|
if pages < 15 then --sometimes pages is nil, not entirely sure why but we'll assume it's nothing worrying xd
|
||||||
if auction_record.blizzard_query.name ~= '' then --if search query is empty, dont share data
|
if GetChannelName("LFT") ~= 0 then
|
||||||
if GetChannelName("LFT") ~= 0 then
|
SendChatMessage("AuxData," .. item_key .."," .. unit_buyout_price , "CHANNEL", nil, GetChannelName("LFT"))
|
||||||
SendChatMessage("AuxData," .. item_key .."," .. unit_buyout_price , "CHANNEL", nil, GetChannelName("LFT"))
|
--print("sent")
|
||||||
--print("sent")
|
end
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
--[[ function AuxAddon:OnCommReceive(prefix, sender, distribution, item_key, unit_buyout_price) --copied code from process_auction. <- code for when using acecomm
|
--[[ function AuxAddon:OnCommReceive(prefix, sender, distribution, item_key, unit_buyout_price) --copied code from process_auction. <- code for when using acecomm
|
||||||
print("received data"); --for testing (print comes from PFUI)
|
print("received data"); --for testing (print comes from PFUI)
|
||||||
|
|||||||
+2
-1
@@ -133,7 +133,7 @@ function scan_page(i)
|
|||||||
do (get_state().params.on_page_scanned or pass)() end
|
do (get_state().params.on_page_scanned or pass)() end
|
||||||
if get_query().blizzard_query and get_state().page < last_page(get_state().total_auctions) then
|
if get_query().blizzard_query and get_state().page < last_page(get_state().total_auctions) then
|
||||||
get_state().page = get_state().page + 1
|
get_state().page = get_state().page + 1
|
||||||
pages = last_page(get_state().total_auctions)
|
|
||||||
return submit_query()
|
return submit_query()
|
||||||
else
|
else
|
||||||
return scan()
|
return scan()
|
||||||
@@ -146,6 +146,7 @@ function scan_page(i)
|
|||||||
auction_info.page = get_state().page
|
auction_info.page = get_state().page
|
||||||
auction_info.blizzard_query = get_query().blizzard_query
|
auction_info.blizzard_query = get_query().blizzard_query
|
||||||
auction_info.query_type = get_state().params.type
|
auction_info.query_type = get_state().params.type
|
||||||
|
pages = last_page(get_state().total_auctions)
|
||||||
|
|
||||||
history.process_auction(auction_info, pages)
|
history.process_auction(auction_info, pages)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user