PDA

View Full Version : Help getting info of a raid member.


Rosemourne
27-06-2006, 08:54 AM
I'm making an addon that works great so far, but I would like to include a failsafe so that it doesn't fire under certain conditions when your target player entered is not in the raid / offline / not in the zone.

I've checked with WoWWiki, but I can't seem to find a good way to determine if the player is in the raid, online and in the zone. Do I have to call the ID of every raid member and then have the addon /who them for it?

I hope not :X

Elsewhere
05-07-2006, 07:29 AM
not tested, but should work

for i = 1, GetNumRaidMemebers() do
if ( UnitIsUnit("target", "raid"..i) ) then
local unit = "raid"..i;
break;
end
end
local name, rank, subgroup, level, class, fileName, zone, online, isDead = GetRaidRosterInfo(unit)
if zone == (GetZoneText) and name == (UnitName("target")) and (not isDead) and online then
...do your stuff here...
end