Originally Posted by eldorado3
I've set the main tank using the Blizard's system (/mt), but I don't know how to use it: I don't know how to determine whether a user is main tank in my add-on. Is there such an API allowing me to do so (maybe UnitIsMainTank??)?
|
It looks like the API function you may be looking for is GetRaidRosterInfo(index) (I don't know if there is another way to do this or not, but this is what I found from perusing the API on WoWWiki.)
Code:
name, rank, subgroup, level, class, fileName,
zone, online, isDead, role, isML = GetRaidRosterInfo(raidIndex);
role should contain the string "maintank" if the unit is the raid's main tank.