WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   How to access DisplayID of a game object (https://www.wowinterface.com/forums/showthread.php?t=58979)

Zicoss 11-16-21 01:50 PM

How to access DisplayID of a game object
 
Like the title, how to access DisplayID of a game object to display it in a frame.

By game object, i mean an object like this https://fr.wowhead.com/object=148502/page-9 or like all these interactive objects https://www.wowhead.com/objects

I looked at the wowhead code source and i found that there was displayID for the object. So i tried to display it with SetDisplayInfo(displayID) function, but this function it's only for NPC display ID and not for object.

Maybe i miss another function or stuff like that idk.

Hope you'll help me, if you have any questions i'll anwser them.

Ketho 11-16-21 02:11 PM

It looks like you need to look up that ID in GameObjectDisplayInfo.db2
Lua Code:
  1. local m = CreateFrame("PlayerModel")
  2. m:SetPoint("CENTER")
  3. m:SetSize(200, 200)
  4. m:SetModel(305393) -- world/expansion03/doodads/worgen/items/worgen_paper_04.m2

Zicoss 11-16-21 03:56 PM

That's exactly what i'm looking for, thank you so much!


All times are GMT -6. The time now is 02:19 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI