In most cases code responds to events, therefore they happen first and then you do something when they fire.
For example, AUCTION_HOUSE_SHOW fires and then you can scan for listed posts. You wouldn't, nor couldn't, scan for auctions if the auction house window was not open.
An obvious exception is C_AuctionHouse.CloseAuctionHouse() which then triggers AUCTION_HOUSE_CLOSED, essentially the reverse of the usual activity.
|