WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General Authoring Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=20)
-   -   Get NPC Name (https://www.wowinterface.com/forums/showthread.php?t=56865)

Synsanken 11-27-18 12:20 PM

Get NPC Name
 
I'm looking through the API and I'm trying to figure out if there's a way to get the in-game name of a character in game, specifically, a hunter pet. I have found options to get the unit name, but those return the name of the pet (the name the hunter gave the pet). I am interested in getting the in-game name. The name before the pet was tamed.

I would like to have it return "King Krush" instead of "Bigreendino". I've checked through the Pet and Unit APIs and nothing is standing out for me.

p3lim 11-27-18 04:08 PM

There's nothing that can do that for you.
The best you could do is have a pre-defined list of models associated with NPC names, then match the models with the pets'. Not as accurate, and you'll end up with multiples, but it'd work.

elcius 11-29-18 12:56 AM

The npc id is the 5th value in the pet guid
Pet-0-3888-1220-15-89689-0102621669
I think in bfa they added some new systems to query npc info, if not you can resolve the name through scraping a tooltip.


All times are GMT -6. The time now is 12:01 AM.

vBulletin © 2019, Jelsoft Enterprises Ltd
© 2004 - 2019 MMOUI