Quantcast

Add Demonic Fury for Warlocks

Adrian L Lange [06-19-14 - 23:30]
Add Demonic Fury for Warlocks
Filename
oUF_P3lim.lua
tags.lua
diff --git a/oUF_P3lim.lua b/oUF_P3lim.lua
index 99fd39a..c9148fa 100644
--- a/oUF_P3lim.lua
+++ b/oUF_P3lim.lua
@@ -184,7 +184,7 @@ local UnitSpecific = {
 		PowerValue:SetFont(FONT, 8, 'OUTLINEMONOCHROME')
 		PowerValue:SetJustifyH('LEFT')
 		PowerValue.frequentUpdates = 0.1
-		self:Tag(PowerValue, '[p3lim:power][ |cff00ff96>chi][ |cfffff568>holypower][ |cff7b68ee>shadoworbs][ |cffba55d3>p3lim:shards][ |cff0090ff>p3lim:mana<|r][ | >p3lim:spell]')
+		self:Tag(PowerValue, '[p3lim:power][ |cff00ff96>chi][ |cfffff568>holypower][ |cff7b68ee>shadoworbs][ |cffba55d3>p3lim:shards][ |cff997fcc>p3lim:fury<|r][ |cff0090ff>p3lim:mana<|r][ | >p3lim:spell]')

 		local Experience = CreateFrame('StatusBar', nil, self)
 		Experience:SetPoint('BOTTOM', 0, -20)
diff --git a/tags.lua b/tags.lua
index e593d82..919087e 100644
--- a/tags.lua
+++ b/tags.lua
@@ -125,6 +125,16 @@ tags.Methods['p3lim:spell'] = function(unit)
 	return UnitCastingInfo(unit) or UnitChannelInfo(unit)
 end

+tags.Events['p3lim:fury'] = 'UNIT_POWER SPELLS_CHANGED'
+tags.Methods['p3lim:fury'] = function(unit)
+	if(GetSpecialization() ~= SPEC_WARLOCK_DEMONOLOGY) then return end
+
+	local cur = UnitPower(unit, SPELL_POWER_DEMONIC_FURY)
+	if(cur > 0) then
+		return cur
+	end
+end
+
 tags.Events['p3lim:shards'] = 'UNIT_POWER SPELLS_CHANGED'
 tags.Methods['p3lim:shards'] = function(unit)
 	if(GetSpecialization() ~= SPEC_WARLOCK_AFFLICTION) then return end