Skip to content
everloot

Lore archive · Warcraft Wiki, 2023 dump

API GetSpecializationMasterySpells

Last wiki revision 2022-08-01

Returns the mastery spell ID of the specified specialization. spellID = GetSpecializationMasterySpells(specIndex [, isInspect, isPet])

  • specIndex: - The index of the specialization to query (1, 2, 3, 4) (Druids have four specializations)
  • isInspect: - Reserved. Must be nil
  • isPet: - Reserved. Must be nil
  • masterySpell: - The Mastery spellID corresponding to one of the current player's specializations
  • masterySpell2: - The Mastery spellID corresponding to one of the current player's specializations

Example return values for different classes:

For any type of data tracking, use the second parameter, since it is guaranteed to stay the same in different-language clients. This is especially important in Europe, where it is not uncommon for people with e.g. german or french client software to play on english servers. You can keep track of mappings for display by remembering the output pairs in a table, e.g.:

local mySpecializationIndex = GetSpecialization; --e.g. 1: Brewmaster local myMasterySpellID; if (mySpecializationIndex) then myMasterySpellID = GetSpecializationMasterySpells(mySpecializationIndex); else myMasterySpellID = nil; end;

or we can store all the current player's mastery spells:

local playerMasterySpells = { GetSpecializationMasterySpells(1), --e.g. Brewmaster GetSpecializationMasterySpells(2), --e.g. Mistweaver GetSpecializationMasterySpells(3), --e.g. Windwalker )

Source

https://warcraft.wiki.gg/wiki/API_GetSpecializationMasterySpells · retrieved 2023-11-13 · CC BY-SA 4.0

Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.

This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.