View Single Post
08-27-13, 01:33 PM   #19
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
Some new, possibly unintentional api functions regarding the new treasure chest/rare minimap icons:
local numVignettes = C_Vignettes.GetNumVignettes() -- number of visible icons
local vignetteInstanceID = C_Vignettes.GetVignetteInstanceID(i) -- takes 1 - numVignettes
local x, y, name, unknown = C_Vignettes.GetVignetteInfoFromInstanceID(vignetteInstanceID)

x and y coordinates refer to the icon's position relative to the bottom left of the minimap and change based on the size and scale of the minimap as well as (apparently) the window resolution or possibly the aspect ratio.

They come with a couple events VIGNETTE_ADDED and VIGNETTE_REMOVED which fire when an icon appears or disappears, respectively. Both provide the instanceID of the affected vignette.

Last edited by semlar : 08-27-13 at 01:38 PM.
  Reply With Quote