
Proposal to improve buy function
ceylina opened this issue ยท 0 comments
Keeping search query function (page of pages) intact for now with minor change:
Add slider to limit the amount of pages scanned in a search (buy or sell)
Make slider from 25 to 200
Below is code segment that includes scan limit.
Proposed add user defined limit with range defined above (increments of 25)
AuctionatorScan.lua
function AtrSearch:ShouldAnalyze()
-- hopefully this will never happen but need check to avoid looping
if self.query.numDupPages > 50 then
return false
end
-- give Blizz servers a break (200 pages)
if self.current_page == 1 and self.query.totalAuctions > 10000 then
Atr_Error_Display( ZT( "Too many results\n\nPlease narrow your search" ))
return false
end
return true
end
Could also improve sales queries by using the proposed slider to limit sales queries
or
Could offer option to not use live scanning to get prices but use full scan data instead. This would greatly improve selling with the caveat that sales values would not be the most current.
Improvement for buy button function
Use existing query to search for selected item or advanced search.
Will we use GetNumAuctionItems to return index? Is this not already used when searching for items?
Ensure the following entries are stored in array
- Seller name (ownerFullName)
- Item ID
- Item name
- Price (buyoutPrice)
- Quantity (my not be needed - aka stacks)
These will then be stored in the current array that is used to format and display in GUI the results of a scan.
http://wowwiki.wikia.com/wiki/API_GetAuctionItemInfo
Use GetAuctionItemInfo instead of querying auction items to check against clicked item in array (displayed in GUI), using index number either stored in array or matching GetNumAuctionItems.
Compare array entry points described above against returned values from GetAuctionItemInfo and use value from saleStatus to verify is auction can be bought.
Auction entries can contain blank seller names and may not validate properly if the item is removed quickly or the seller deletes the account or server transfers. This should be checked and if the bidderFullName from GetNumAuctionItems is blank or nil then count the item in the search result as not available.
This should help to eliminate the long delay in trying to buy and item. Now some checks that should be placed in to prevent issues are:
Add in a slight delay when clicking buy to allow the server to client connection to catch up. One or two frame refreshes should be enough (unsure of frame refresh time, most likely in milliseconds)
Add time out to an idle search result stored as array. So if someone searches for say ore and lets it sit for 10 minutes, it should have already timed out the results and prompt user that they need to search again. I am unsure of the optimal time to do this, perhaps 5 minutes but could be safe for as long as 10? The longer it goes, the greater chance of too many items sold and search results becoming stale.