Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:CancelAuction

From RoR Wiki

UI Lua API · Auction functions
Version: WAR 1.4.8

Asks the server to cancel one of the player's own auction listings.

CancelAuction(auctionIdHigh, auctionIdLow, revision)

Arguments

auctionIdHigh
number – High part of the auction id (auctionIDHigherNum in the stock search results).
auctionIdLow
number – Low part of the auction id (auctionIDLowerNum).
revision
number – Revision number of the listing (revision).

Returns

Nothing.

Details

  • Sends the same request as BuyAuction, with a price of 0 and the cancel marker set.
  • There is no confirmation in the client. The stock UI shows a Yes/No dialog first.
  • Whether the cancel is allowed is decided by the server.
  • The function needs at least three arguments and only reads the last three.

Errors

None besides the generic Invalid Parameters message when an argument is not a number.

Example

The Yes callback of the stock cancel dialog, from default/ea_auctionhousewindow/source/auctionwindow.lua:

function AuctionWindow.CancelPressConfirmed()
    local windowData = AuctionWindowListDataManager.GetCurrentWindowData()
    local auctionData = windowData.searchResultsData[windowData.currentlySelectedRow]

    if( auctionData == nil )
    then
        return
    end

    CancelAuction( auctionData.auctionIDHigherNum, auctionData.auctionIDLowerNum, auctionData.revision )
end

See also