Quantcast

* Only mana bars will be shown by default instead of showing energy/rage/etc.

James Whitehead II [04-25-07 - 23:12]
* Only mana bars will be shown by default instead of showing energy/rage/etc.
* You can adjust this by changing /script PerfectRaid.db.profile.showmanaonly = false
Filename
PerfectRaid.lua
diff --git a/PerfectRaid.lua b/PerfectRaid.lua
index b0f61b3..d142fc1 100644
--- a/PerfectRaid.lua
+++ b/PerfectRaid.lua
@@ -55,6 +55,7 @@ function PerfectRaid:Initialize()
 			},
 			positions = {},
 			hideparty = true,
+			showmanaonly = true,
 		},
 	}

@@ -522,6 +523,13 @@ function OnAttributeChanged(frame, name, value)
 		frame.manabar:SetMinMaxValues(0, UnitManaMax(unit))
 		frame.manabar:SetValue(UnitMana(unit))

+		-- Show/Hide the mana bar depending on unit power type
+		if UnitPowerType(unit) == 0 and frame.options.manaheight > 0 then
+			frame.manabar:Show()
+		 elseif self.db.profile.showmanaonly then
+			frame.manabar:Hide()
+		end
+
 		frame.status:SetText(nil)

 		frames[unit] = frames[unit] or {}