View Single Post
06-30-12, 12:14 PM   #32
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
How to check talents of other players

Here is some additional information about checking talents that I found last night while fixing up TipTop.

As mentioned on http://www.wowpedia.org/Patch_5.0.1/API_changes some of the functions have had their names changed. Also, some of these have changed usage.

GetPrimaryTalentTree() has changed to GetSpecialization(). In addition, if you are inspecting someone, you need to use GetInspectSpecialization("unit"). This will return a number (not sure what it really represents or how it is determined...) which you can then pass to GetSpecializationInfoByID().

So... when inspecting someone for their talents... You call NotifyInspect("unit") and register for "INSPECT_READY" just as before. When the event fires, call GetInspectSpecialization("unit") to get that ID number and then, if the ID exists and is greater than 0 (cause, sometimes it's 0 for some reason), pass that ID to GetSpecializationInfoByID().

One additional reminder: it is sill a good idea to save the UnitGUID of the unit you are inspecting so that you can check that GUID with what is returned with "NOTIFY_INSPECT".
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh