Usage of cancelAuctions() unclear
steenert opened this issue ยท 5 comments
Hi,
If possible, could you explain a little bit how we should call the "cancelAuctions()" function? Can it be called directly after "CommodityBuyerAndSeller.sell" or should it be used in some other way? Also is there a way to always cancel auctions that have been undercut?
Thanks in advance!
Hi, in the current state it can be called manually to cancel auctions with: /run CommodityBuyerAndSeller.cancelAuctions()
.
Hi Sanjo -
Also curious how this works. When you run the .cancelAuctions() command manually, what is the logic behind what it should cancel? Is it looking for undercut auctions, or some other flag?
Based on the metric for how many auctions seem to be sold per day (from TradeSkillMaster), it cancels everything where it seems that the auction runs out.
With this implementation, even when there are some auctions for a lower price in the auction house, if enough of the commodity is sold per day, the auction is kept in the auction house.
The implementation can be found here:
CommodityBuyerAndSeller/CommodityBuyerAndSeller/CommodityBuyerAndSeller.lua
Lines 162 to 179 in 3b558e0
Ah I see, interesting! I can see how that would be useful for certain items.
I was hoping there might be a Cancel function that can cycle through existing auctions and check for undercuts and cancel those auctions. I know the logic exists to check for undercuts, as you have that working when posting items. When posting Region-Wide Commodities quickly, it's helpful to be able to cancel auctions immediately after running out of stock. Maybe even define just specific items to cancel on the AH via the API. The same way we define items to post via the CommodityBuyerAndSellerData.lua file.