Quantcast

More changes for MoP.

F16Gaming [04-02-12 - 18:01]
More changes for MoP.
Filename
Events.lua
GroupTools.lua
diff --git a/Events.lua b/Events.lua
index 4ae0f1b..c00018b 100644
--- a/Events.lua
+++ b/Events.lua
@@ -83,7 +83,10 @@ function C.Events.READY_CHECK_FINISHED(self, ...)
 	C.Data.ReadyCheckRunning = false
 end

-function C.Events.RAID_ROSTER_UPDATE(self, ...)
+function C.Events.GROUP_ROSTER_UPDATE(self, ...)
+	if StaticPopup_Visible("PARTY_INVITE") then
+		StaticPopup_Hide("PARTY_INVITE")
+	end
 	if AC.GroupRunning then return end
 	AC:UpdateGroup()
 end
@@ -101,14 +104,6 @@ function C.Events.PARTY_INVITE_REQUEST(self, ...)
 	end
 end

-function C.Events.PARTY_MEMBERS_CHANGED(self, ...)
-	if StaticPopup_Visible("PARTY_INVITE") then
-		StaticPopup_Hide("PARTY_INVITE")
-	end
-	if AC.GroupRunning then return end
-	AC:UpdateGroup()
-end
-
 function C.Events.PARTY_LEADER_CHANGED(self, ...)
 	if AC.GroupRunning then return end
 	AC:UpdateGroup()
diff --git a/GroupTools.lua b/GroupTools.lua
index 4300c84..995c9f4 100644
--- a/GroupTools.lua
+++ b/GroupTools.lua
@@ -73,7 +73,7 @@ end
 function GT:GetNumGroupMembers()
 	if not self:IsGroup() then return 0 end
 	if UnitInRaid("player") then
-		return GetNumRaidMembers()
+		return GetNumGroupMembers()
 	else
 		return GetNumSubgroupMembers() + 1 -- We need to add one because it won't count the player
 	end
@@ -100,7 +100,7 @@ end
 function GT:IsRaidLeaderOrAssistant(name)
 	name = name or "player"
 	if not self:IsRaid() then return false end
-	for i=1,GetNumRaidMembers() do
+	for i=1,GetNumGroupMembers() do
 		local name, rank = (select(1, GetRaidRosterInfo(i))), (select(2, GetRaidRosterInfo(i)))
 		if name:lower() == UnitName("player"):lower() then
 			if rank >= 1 then return true end
@@ -124,7 +124,7 @@ end
 --
 function GT:IsInGroup(name)
 	if self:IsRaid() then
-		for i=1,GetNumRaidMembers() do
+		for i=1,GetNumGroupMembers() do
 			local n = (select(1, GetRaidRosterInfo(i)))
 			if n == name then return true end
 		end