From 0e08b8cd7cf6ad9c2cb58384ca62eb2db7c6c69c Mon Sep 17 00:00:00 2001 From: Adrian L Lange Date: Fri, 20 Jun 2014 01:30:13 +0200 Subject: [PATCH] Add some soulshards that actually only show for affliction --- oUF_P3lim.lua | 2 +- tags.lua | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) 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 -- 1.7.9.5