Getting the UnitID of an unseen NPC.

UI and Macro
Hey I was wondering if it was possible to get the UnitID of an NPC not currently visible to the player, what I am trying to do is create a frame and put the image of like any type of NPC inside that frame. I was wondering if that was possible.
This is using;
If you want a 3D model, you may be able to use a PlayerModel frame and call :SetDisplayInfo with the displayID of the NPC you want to show.

You can figure out an NPC's displayID by going to the NPC's Wowhead page, viewing its source and searching that for "" (with that capitalisation). You should see something like this:onclick="this.blur();{ type: 1, typeId: 6466, displayId: 5205, humanoid: 1 })"

The number next to displayId is the displayID of the NPC (obviously).

I don't think you can do the same for a 2D portrait, since you need an actual unitID for that and these are the only valid unitIDs:
Exactly what I was looking for, thank you so much!

Join the Conversation

Return to Forum