C_Vignettes.GetNumVignettes

From Warcraft Wiki
Jump to navigation Jump to search
Links
Info
Added in 5.4.0

Returns the number of vignettes currently visible to the player.

numVignettes = C_Vignettes.GetNumVignettes()

Returns

numVignettes
Number - number of vignettes currently visible on the player's minimap (either as icons or directional arrows).

Example

To print the names of all currently visible vignettes:

local numVignettes = C_Vignettes.GetNumVignettes()
for i=1, numVignettes do
 local vigInstanceID = C_Vignettes.GetVignetteInstanceID(i)
 local ofsX, ofsY, name = C_Vignettes. GetVignetteInfoFromInstanceID(vigInstanceID)
 print(i, name, " at +(" .. ofsX .. ", " .. ofsY .. ")")
end
if numVignettes == 0 then
 print("No vignettes are currently visible")
end

Patch history

See also