View Single Post
10-10-14, 06:55 PM   #7
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
I'm trying to decide how best to determine that the people in the raid are also in the current boss fight and not outside the instance.

You could loop over the raid on ENCOUNTER_START and put everyone who's in the same zone as you into a table to reference throughout the fight, or you could compare their zone (from GetRaidRosterInfo) to yours when they're resurrected.. but I'm not sure if phasing could potentially cause problems with that.

I was thinking something like this..
Lua Code:
  1. for i = 1, GetNumGroupMembers() do
  2.     local name, _, _, _, _, class, zone, online, isDead, _, _, role = GetRaidRosterInfo(i)
  3.     if zone == OurZone and online then
  4.         if not isDead and WhoDead[name] then -- unit no longer dead, presumed rezzed
  5.             WhoDead[name] = nil
  6.             NumRezzed = NumRezzed + 1
  7.         elseif isDead and not WhoDead[name] then -- someone died
  8.             WhoDead[name] = true
  9.         end
  10.     end
  11. end

Last edited by semlar : 10-10-14 at 06:59 PM.