Quantcast

Add some soulshards that actually only show for affliction

Adrian L Lange [06-19-14 - 23:30]
Add some soulshards that actually only show for affliction
Filename
oUF_P3lim.lua
tags.lua
diff --git a/oUF_P3lim.lua b/oUF_P3lim.lua
index 43796fb..99fd39a 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>soulshards][ |cff0090ff>p3lim:mana<|r][ | >p3lim:spell]')
+		self:Tag(PowerValue, '[p3lim:power][ |cff00ff96>chi][ |cfffff568>holypower][ |cff7b68ee>shadoworbs][ |cffba55d3>p3lim:shards][ |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 de332dc..e593d82 100644
--- a/tags.lua
+++ b/tags.lua
@@ -124,3 +124,13 @@ end
 tags.Methods['p3lim:spell'] = function(unit)
 	return UnitCastingInfo(unit) or UnitChannelInfo(unit)
 end
+
+tags.Events['p3lim:shards'] = 'UNIT_POWER SPELLS_CHANGED'
+tags.Methods['p3lim:shards'] = function(unit)
+	if(GetSpecialization() ~= SPEC_WARLOCK_AFFLICTION) then return end
+
+	local cur = UnitPower(unit, SPELL_POWER_SOUL_SHARDS)
+	if(cur > 0) then
+		return cur
+	end
+end