I tried using the following to log information on NPCs inside a EVENT_RETICLE_TARGET_CHANGED function:
Code:
local level = GetUnitLevel(unitTag)
local gender = GetUnitGender(unitTag)
local difficulty = GetUnitDifficulty(unitTag)
local class = GetUnitClass(unitTag) --Doesn't work
local race = GetUnitRace(unitTag) --Doesn't work
The first 3 functions work fine but the Class/Race functions return an empty string. I assume they work fine on PCs but was wondering why not working on NPCs? I would expect NPCs to have a set race. As far as I can tell there are no other "get race" type functions in the API.
Any ideas or pointing out something I've missed would be great.