Stanzilla / WoWUIBugs

World of Warcraft UI Bug Tracker
153 stars 7 forks source link

Wrath: Additional throttle information on Auction House to improve addon stability #461

Open plusmouse opened 11 months ago

plusmouse commented 11 months ago

In Wrath whenever the auction house server decides to reject a call it returns an internal auction error message that is displayed to the user. This usually comes with one or more actions failing leading to the action needing to be attempted again.

Despite a lot of testing there isn't a way to eliminate the internal auction errors. They can be reduced by waiting for the last queried API to respond (e.g. Post auction, wait for the "Auction Created" message before moving on) and combining that with watching the value of CanSendAuctionQuery()

I get that Blizzard doesn't want addons to automate auction house behaviour or stress the servers, but the current API is inadequate for addons to provide a stable experience. Stable as in, actions don't need repeating, even if you have to wait an extra time period to attempt them.

I have a proposal. A new API that reports when the server is happy for the addon to send another action and is, assuming that the latest AH state doesn't render the action impossible, not going to fail with an internal auction error. A possible API would be this:

IsAuctionHouseReadyForAction() -- returns boolean

Which returns a boolean, which is true if the next post, cancel or purchase attempt is unlikely to fail with an internal auction error. Note that e.g failing with an already purchased error is fine.

and an event to report when the throttle state changes

AUCTION_HOUSE_ACTION_STATE_CHANGE

There is CanSendAuctionQuery() in the existing API, but this is limited to checking if searches only will succeed, its necessary to check for any action being able to succeed to provide a good experience.

A proper throttle API exists on retail for checking whether the server is ready for another action, and it would be great if classic could have an API that does the same job.

plusmouse commented 11 months ago

Additional, even when CanSendAuctionQuery() indicates that a search should be possible the search sometimes fails and stops being possible to even do a repeat attempt. Ideally any throttle improvements would help with this too.