Get NPC Name - WoWInterface
Thread Tools Display Modes
11-27-18, 12:20 PM   #1
A Defias Bandit
AddOn Author - Click to view addons
Join Date: Nov 2018
Posts: 2
Question 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.
I've been playing WoW since 2007. I'm currently working on my website, Syntax Sandbox, where you'll be able to get support for my WoW addons.

Last edited by Synsanken : 11-27-18 at 12:23 PM.
  Reply With Quote
11-27-18, 04:08 PM   #2
A Pyroguard Emberseer
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,705
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.
  Reply With Quote
11-29-18, 12:56 AM   #3
A Cliff Giant
AddOn Author - Click to view addons
Join Date: Sep 2011
Posts: 71
The npc id is the 5th value in the pet guid
I think in bfa they added some new systems to query npc info, if not you can resolve the name through scraping a tooltip.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Get NPC Name

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off