Quantcast

* Added the code to hide the party frame, need to add an option for it

James Whitehead II [01-25-08 - 10:49]
* Added the code to hide the party frame, need to add an option for it
Filename
PerfectRaid.lua
diff --git a/PerfectRaid.lua b/PerfectRaid.lua
index 76306c3..0eeb728 100644
--- a/PerfectRaid.lua
+++ b/PerfectRaid.lua
@@ -235,6 +235,27 @@ function PerfectRaid:CreateRaidFrame(idx)

 	end

+	if self.db.profile.hideparty then
+		if self.db.profile.hideparty and self.hasparty then
+			-- Disable the party frames
+			self.hidingparty = true
+			for i=1,4 do
+				local f = getglobal("PartyMemberFrame"..i)
+				f:UnregisterEvent("RAID_ROSTER_UPDATE")
+				f:UnregisterEvent("PARTY_MEMBERS_CHANGED")
+			end
+			HidePartyFrame()
+		elseif self.hidingparty then
+			self.hidingparty = false
+			for i=1,4 do
+				local f = getglobal("PartyMemberFrame"..i)
+				f:RegisterEvent("RAID_ROSTER_UPDATE")
+				f:RegisterEvent("PARTY_MEMBERS_CHANGED")
+			end
+			ShowPartyFrame()
+		end
+	end
+
 	-- Position backdrop
 	local bgtopoffset = 6
 	bgtopoffset = bgtopoffset + (options.title and 20 or 0)