Thread Tools Display Modes
01/25/16, 02:28 PM   #1
SnowmanDK
 
SnowmanDK's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 161
[outdated] GetUnitNameFromID/GetUnitID

I know all npc's have a unique id, just as quests.

If we could get something like
GetUnitNameFromID(Integer UnitID)
Returns: string UnitName


that would be awesome, as I could make my addon Destinations a LOT smaller, and it would save me a ton of work. Right now I have to have the names of questgiving units in both EN, DE, and FR in my addon.

Combine the above with something like
GetUnitID(string unitTag)
Returns: integer UnitID

or
GetUnitID(string unitName)
Returns: integer UnitID

then it would be even better

As it is now, I use something like this in my data for quests (I have a QUEST_ID to QUEST_NAME table already):
Lua Code:
  1. {X_COORD,   Y_COORD,    EN_QUESTNAME,   DE_QUESTNAME,   FR_QUESTNAME,   EN_QUESTGIVERNAME,  DE_QUESTGIVERNAME,  FR_QUESTGIVERNAME,  QUEST_TYPE, QUEST_REPEATABLE,   QUEST_ID},
I know the quest names are redundant when I have the ID's already, but I have been delaying the cleaning of that as I was hoping to be able to do something like this:
Lua Code:
  1. {X_COORD,   Y_COORD,    UNIT_ID,    QUEST_TYPE, QUEST_REPEATABLE,   QUEST_ID},
 
01/26/16, 03:37 AM   #2
coolmodi
AddOn Author - Click to view addons
Join Date: Mar 2015
Posts: 47
The current unitId that can be found with the combat and effect event is not unique, it only stays the same as long as the unit is loaded.

They'd need to implement a completely new ID to permanently indetify NPCs into the API.
 
01/26/16, 06:55 AM   #3
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,578
I think that's what he meant. It should be called npcId instead of unitId as that name is already in use for something else.
 
01/26/16, 07:24 AM   #4
SnowmanDK
 
SnowmanDK's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 161
Originally Posted by sirinsidiator View Post
I think that's what he meant. It should be called npcId instead of unitId as that name is already in use for something else.
You are correct
Sorry if I expressed myself in a way that could be misunderstood
 
05/21/16, 05:04 PM   #5
Letho
AddOn Author - Click to view addons
Join Date: Apr 2016
Posts: 238
Thumbs up

I definetely share this request. Without persistent unit IDs (in WoW they are calld GUID, global unit ids) there is no way to save aura data the way i need to do (this problem would not exist, if GetUnitBuffInfo() would return a unitID, but i like the approach of getting unitIDs from unitTags much more as it's a more universal system). GUIDs are not only for NPCs btw, but for every unit entity in the game, players included. AFAIK they are created upon login.

Last edited by Letho : 05/21/16 at 05:09 PM.
 

ESOUI » Developer Discussions » Wish List » [outdated] GetUnitNameFromID/GetUnitID

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