Quantcast

Add more class-specific powers

Adrian L Lange [06-19-14 - 18:06]
Add more class-specific powers
Filename
oUF_P3lim.lua
tags.lua
diff --git a/oUF_P3lim.lua b/oUF_P3lim.lua
index 62d8a54..43796fb 100644
--- a/oUF_P3lim.lua
+++ b/oUF_P3lim.lua
@@ -119,7 +119,6 @@ local function PostCreateAura(element, button)

 	button:HookScript('OnUpdate', UpdateAura)
 end
-
 local function PostUpdateBuff(element, unit, button, index)
 	local _, _, _, _, _, duration, expiration = UnitAura(unit, index, button.filter)

@@ -185,7 +184,7 @@ local UnitSpecific = {
 		PowerValue:SetFont(FONT, 8, 'OUTLINEMONOCHROME')
 		PowerValue:SetJustifyH('LEFT')
 		PowerValue.frequentUpdates = 0.1
-		self:Tag(PowerValue, '[|cffffff00>holypower<|r ][p3lim:power][ >p3lim:druid][ | >p3lim:spell]')
+		self:Tag(PowerValue, '[p3lim:power][ |cff00ff96>chi][ |cfffff568>holypower][ |cff7b68ee>shadoworbs][ |cffba55d3>soulshards][ |cff0090ff>p3lim:mana<|r][ | >p3lim:spell]')

 		local Experience = CreateFrame('StatusBar', nil, self)
 		Experience:SetPoint('BOTTOM', 0, -20)
@@ -221,8 +220,8 @@ local UnitSpecific = {
 		AltPowerBG:SetAllPoints()
 		AltPowerBG:SetTexture(1/3, 1/3, 1/3)

-		local playerClass = select(3, UnitClass('player'))
-		if(playerClass == 6) then
+		local _, playerClass = UnitClass('player')
+		if(playerClass == 'DEATHKNIGHT') then
 			local Parent = CreateFrame('Frame', nil, UIParent)
 			Parent:SetPoint('CENTER', 0, -230)
 			Parent:SetSize(82, 40)
diff --git a/tags.lua b/tags.lua
index 92b0853..7447538 100644
--- a/tags.lua
+++ b/tags.lua
@@ -86,10 +86,10 @@ tags.Methods['p3lim:power'] = function(unit)
 	end
 end

-tags.Methods['p3lim:druid'] = function(unit)
+tags.Methods['p3lim:mana'] = function(unit)
 	local min, max = UnitPower(unit, 0), UnitPowerMax(unit, 0)
 	if(UnitPowerType(unit) ~= 0 and min ~= max) then
-		return ('|cff0090ff%d%%|r'):format(min / max * 100)
+		return ('%d%%'):format(min / max * 100)
 	end
 end