Thread Tools Display Modes
06-27-06, 12:47 AM   #1
Rosemourne
A Defias Bandit
Join Date: Jun 2006
Posts: 2
Getting Raid info / ID

I'm programming 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 GetRaidRosterInfo(); and compare the name, zone and online of each of those with a == or ~= value on every RaidID in the raid?

I hope not :X

Last edited by Rosemourne : 06-27-06 at 01:14 AM.
  Reply With Quote
06-27-06, 12:55 AM   #2
Chef_de_Loup
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Apr 2006
Posts: 12
for raid you can use
UnitInRaid("target");

For offline status:
UnitIsConnected("target");

for zone i cant find a simple way or function
  Reply With Quote
06-27-06, 01:05 AM   #3
Rosemourne
A Defias Bandit
Join Date: Jun 2006
Posts: 2
Ah, thanks. However, it doesn't operate on target. That was a bad way for me to describe that, there. Rather the command works with a name. Such as Litheya or Elsivine.
  Reply With Quote
06-27-06, 12:47 PM   #4
Esamynn
Featured Artist
Premium Member
Featured
Join Date: Jan 2005
Posts: 395
For using a name as the identifier, you will have to scan the output of GetRaidRosterInfo() at some point, the question is when. Depending on how often you are calling your lookup function, you can either scan GetRaidRosterInfo() each time you call it, or you can monitor the RAID_ROSTER_UPDATE event and scan GetRaidRosterInfo() each time that event fires and cache the output in a table.

Also, a good function to use is GetNumRaidMembers() which will allow you to only scan the current valid indicies of GetRaidRosterInfo().
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Getting Raid info / ID


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off