WoW API: GetLFGTypeEntries

From AddOn Studio
Revision as of 04:46, 15 August 2023 by Move page script (talk | contribs) (Move page script moved page API GetLFGTypeEntries to API GetLFGTypeEntries without leaving a redirect)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

WoW API < GetLFGTypeEntries

Returns all available LFG objectives for a category

objective1, smallName1, objective2, smallName2, objective3, smallName3, ... = GetLFGTypeEntries(category)

Takes[edit]

Number category
Index of the category to retrieve objectives for. See GetLFGTypes()

Returns[edit]

String objectiveN
Name of Nth objective
String smallNameN
A compressed name of Nth objective. Has no spaces - presumably the internal computer file name.

Events[edit]

Needs UPDATE_LFG_LIST

Details[edit]

This always only returns objectives fitting for your level, however WoW is very tolerant here. The results in the example are from a level 44 character.
Also, WoW does not distinguish between hostile and friendy area when doing a lookup in the zone category, this is probably quite useful for arranging raids onto enemy territory, especially because dishonorable kills probably will be gone with the new honor system in Burning Crusade.
When using this function to feed other LFG functions with its results, remember that these functions only want the index of the value, not the value itself. If you wanted to use 'Maraudon' as objective, you would have to supply the number 2. Look at the example!

Example[edit]

local entries = {GetLFGTypeEntries(1)}
for i,objective in entries do
  DEFAULT_CHAT_FRAME:AddMessage(format('Objective %u: %s', i, objective))
end

Output:

Objective 1: Razorfen Downs
Objective 2: RazorfenDowns
Objective 3: Maraudon
Objective 4: Maraudon