API C Vignettes.GetVignetteInfoFromInstanceID

Returns information about a currently visible vignette.
 ofsX, ofsY, name, objectIcon = C_Vignettes.GetVignetteInfoFromInstanceID(vignetteInstanceID)
== Arguments ==
; vignetteInstanceID : Number - instance ID of a currently visible vignette.
== Returns ==
;ofsX : Number - horizontal offset of the vignette icon/arrow from the left edge of the minimap.
;ofsY : Number - vertical offset of the vignette icon/arrow from the bottom edge of the minimap.
;name : String - name of the object this vignette represents, e.g. "Gleaming Treasure Chest"
;objectIcon : Number - minimap blip ID this icon is represented by, e.g. 40 for a chest or 41 for a skull.
== Details ==
* For this function to give output, the client must have last seen the vignette instance ID via a event. Basically, you will not get output from this function unless you enter a vignetteInstanceID that is within 80 or so yards of you (rough range of the event's firing).
* You can receive a vignette instance ID from the event or via the function.
* The offsets are typically decimal values below 1 and are not in the usual UI size units.
* You can convert objectIcon to texture coordinates in Interface\MINIMAP\OBJECTICONS.blp using .
== Current state ==
In Patch 5.4.0, there are devastating bugs in the vignette system that severely limit its use. Basically, vignette instance IDs quickly become too large. The system that handles interaction between Lua and C tries to assign the vignette instance ID a 32-bit signed integer, but vignette instance IDs actually cap out at the cap for 32-bit unsigned integers. This causes an integer overflow, resulting in total failure of C_Vignettes.GetVignetteInfoFromInstanceID() and partial failure of VIGNETTE_ADDED (it will give you negative 64-bit signed integers in place of the real integers for some reason?).
The vignette system will work for fine for objects that never despawn and only fade from the player's view (since they will have the same vignette instance ID as they did when the server came up), but for things like npcs that repeatedly respawn and require new vignette instance IDs, the numbers rapidly become too large. NPCs will work fine with vignettes for the first few hours after a server restart, while they are still within the bounds of signed integers, but they will quickly begin to fail afterwards.
== Patch history ==