View Single Post
09-11-12, 08:27 AM   #7
Rainrider
A Firelord
AddOn Author - Click to view addons
Join Date: Nov 2008
Posts: 454
What you probably need is to call GetInspectSpecialization(name) which returns you a global spec id. You could then use GetSpecializationRoleByID(specID) to get a non-localized role string for that spec. Beware of the return behavior of UnitName(unitid). I use

Code:
local name, realm = UnitName(unitid)
if (realm == "") then realm = nil end
name = realm and name.."-"..realm or name
If you are interested, this is how I do the inspect thing currently. The code is more or less just proof of concept right now and there is probably room for optimization but the inspect works and hopefully does not collide with libs and other inspect addons (haven't tested yet).

I looked at LibGroupInSpecT, but if I didn't miss something, it re-queues the whole group for inspect every 10 sec or so to catch re-specs, which I don't need with my case. The docs say that if you don't call ClearInspectPlayer(name), the server sends further INSPECT_READY events for the unit, so maybe this is the way to get re-specs (haven't tested this yet).
  Reply With Quote