Attempts to exit the World of Warcraft client. Results vary based on current conditions:
- If the player is in combat or under other temporary restrictions (e.g. falling), fires the
UI_ERROR_MESSAGE
event with a message indicating the player cannot log out at the moment. - If the player is not in an inn, major city, or other "rest" area (i.e.
IsResting()
returnsnil
), fires thePLAYER_QUITING
event, causing the default UI to show a countdown, quitting WoW after a period of time if not canceled. - If the player is in a "rest" area, quits the game immediately.
See also Client control and information functions.
Signature:
Quit()