WoW:API LFGQuery: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(corrected event details (tested 12/27/06 - wow 2.0.1))
m (Move page script moved page API LFGQuery to API LFGQuery without leaving a redirect)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{wowapi}}__NOTOC__
{{wowapi}}__NOTOC__ {{removedapi|3.3}}
Find all players who are looking for a group for a specified objective
Find all players who are looking for a group for a specified objective
  LFGQuery(category, objective[, class])
  LFGQuery(category, objective[, class])
Line 21: Line 21:
: Use [[API_GetNumLFGResults|GetNumLFGResults()]] to retrieve the number of results and then iterate over them with [[API_GetLFGResults|GetLFGResults(index)]].
: Use [[API_GetNumLFGResults|GetNumLFGResults()]] to retrieve the number of results and then iterate over them with [[API_GetLFGResults|GetLFGResults(index)]].


: This function, much like any other LFG function, has highly inconsistent code. Executing LFGQuery(nil) will tell you "Usage: LFGQuery(param1[, class])". That prototype is quite outdated but never has been changed, further supporting the assumption stated below.
: Reqires a hardware event for each call to the API, so it should be called from related script handlers such as OnClick. (tested on Live client - Dec 28, 2008)
 
{{User:Zelgadis/LFG_notice}}

Latest revision as of 04:46, 15 August 2023

WoW API < LFGQuery

Find all players who are looking for a group for a specified objective

LFGQuery(category, objective[, class])

Takes[edit]

Number category
Must be the index of one of the values retrieved with GetLFGTypes()
Number objective
Must be the index of one of the values retrieved with GetLFGTypeEntries(category)
Number class (optional)
You can probably specify which character class you are searching for (priest, warrior, druid, etc.), but exact usage is unknown

Returns[edit]

Nothing

Events[edit]

Triggers UPDATE_LFG_LIST
Triggered as soon as query results become available (works, tested on Live client - Dec 27, 2006)

Details[edit]

Use GetNumLFGResults() to retrieve the number of results and then iterate over them with GetLFGResults(index).
Reqires a hardware event for each call to the API, so it should be called from related script handlers such as OnClick. (tested on Live client - Dec 28, 2008)