Quantcast

Group API change

James Whitehead II [09-27-12 - 13:49]
Group API change
Filename
PerfectRaid.lua
PerfectRaid_Aggro.lua
PerfectRaid_Buffs.lua
diff --git a/PerfectRaid.lua b/PerfectRaid.lua
index b07af07..0ec2a13 100644
--- a/PerfectRaid.lua
+++ b/PerfectRaid.lua
@@ -86,8 +86,8 @@ function PerfectRaid:Enable()
 	self.db = self:InitializeDB("PerfectRaidDB", self.defaults)
 	self.db.global.sv_version = self.rev

-	self:RegisterEvent("RAID_ROSTER_UPDATE")
-    self:RegisterEvent("PARTY_MEMBERS_CHANGED", "RAID_ROSTER_UPDATE")
+	self:RegisterEvent("GROUP_ROSTER_UPDATE")
+    self:RegisterEvent("PARTY_MEMBERS_CHANGED", "GROUP_ROSTER_UPDATE")
 	self:RegisterEvent("UNIT_DISPLAYPOWER")
 	self:RegisterEvent("UNIT_HEALTH")
 	self:RegisterEvent("UNIT_MAXHEALTH")
@@ -690,7 +690,7 @@ function PerfectRaid:UpdateButtonLayout(button)
 	end
 end

-function PerfectRaid:RAID_ROSTER_UPDATE()
+function PerfectRaid:GROUP_ROSTER_UPDATE()
 	if self.moving then
 		self.moving:StopMovingOrSizing()
 	end
diff --git a/PerfectRaid_Aggro.lua b/PerfectRaid_Aggro.lua
index 5fd076c..8f4cee4 100644
--- a/PerfectRaid_Aggro.lua
+++ b/PerfectRaid_Aggro.lua
@@ -45,7 +45,7 @@ function Aggro:Initialize()
 	frames = PerfectRaid.frames
 	aggro = PerfectRaid.aggro
 	self:RegisterMessage("DONGLE_PROFILE_CHANGED")
-	self:RegisterMessage("RAID_ROSTER_UPDATE")
+	self:RegisterMessage("GROUP_ROSTER_UPDATE")
 end

 function Aggro:Enable()
diff --git a/PerfectRaid_Buffs.lua b/PerfectRaid_Buffs.lua
index 97f2431..9800aba 100644
--- a/PerfectRaid_Buffs.lua
+++ b/PerfectRaid_Buffs.lua
@@ -44,7 +44,7 @@ local ipairs = genv.ipairs
 local select = genv.select
 local UnitClass = genv.UnitClass
 local UnitRaid = genv.UnitRace
-local GetNumRaidMembers = genv.GetNumRaidMembers
+local GetNumGroupMembers = genv.GetNumGroupMembers
 local CreateFrame = genv.CreateFrame
 local UIParent = genv.UIParent
 local GetRaidRosterInfo = genv.GetRaidRosterInfo
@@ -67,10 +67,10 @@ end

 function Buffs:Enable()
 	self:RegisterEvent("UNIT_AURA")
-	self:RegisterEvent("RAID_ROSTER_UPDATE")
+	self:RegisterEvent("GROUP_ROSTER_UPDATE")

-	if GetNumRaidMembers() > 0 then
-		self:RAID_ROSTER_UPDATE()
+	if GetNumGroupMembers() > 0 then
+		self:GROUP_ROSTER_UPDATE()
 	end

 	self:UpdateBuffTable()
@@ -119,9 +119,9 @@ local raidLookup = {}
 for i=1,40 do
 	raidLookup[i] = "raid"..i
 end
-function Buffs:RAID_ROSTER_UPDATE()
-	if GetNumRaidMembers() > 0 then
-		for i=1,GetNumRaidMembers() do
+function Buffs:GROUP_ROSTER_UPDATE()
+	if GetNumGroupMembers() > 0 then
+		for i=1,GetNumGroupMembers() do
 			local group = select(3, GetRaidRosterInfo(i))
 			local unit = raidLookup[i]
 			if UnitIsUnit(unit, "player") then raidLookup.player = group end