From b13fea6f726d48de1dcaab9e6d6cffdc9db05da5 Mon Sep 17 00:00:00 2001 From: Adrian L Lange Date: Sun, 22 May 2011 06:10:53 +0200 Subject: [PATCH] Move leftover code to the appropriate UnitSpecific functions --- oUF_P3lim.lua | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/oUF_P3lim.lua b/oUF_P3lim.lua index b9c0e0d..97d0325 100644 --- a/oUF_P3lim.lua +++ b/oUF_P3lim.lua @@ -61,6 +61,14 @@ local UnitSpecific = { assistant:SetSize(16, 16) self.Assistant = assistant + local powerValue = self.Health:CreateFontString(nil, 'OVERLAY') + powerValue:SetPoint('LEFT', self.Health, 2, 0) + powerValue:SetPoint('RIGHT', self.HealthValue, 'LEFT', -3) + powerValue:SetFont(FONT, 8, 'OUTLINEMONOCHROME') + powerValue:SetJustifyH('LEFT') + powerValue.frequentUpdates = 0.1 + self:Tag(powerValue, '[p3lim:power][ >p3lim:druid][ | >p3lim:spell]') + self:Tag(self.HealthValue, '[p3lim:status][p3lim:player]') self:SetWidth(230) end, @@ -76,6 +84,11 @@ local UnitSpecific = { buffs.PostCreateIcon = PostCreateAura self.Buffs = buffs + self.Castbar.PostCastStart = PostUpdateCast + self.Castbar.PostCastInterruptible = PostUpdateCast + self.Castbar.PostCastNotInterruptible = PostUpdateCast + self.Castbar.PostChannelStart = PostUpdateCast + local cpoints = self:CreateFontString(nil, 'OVERLAY', 'SubZoneTextFont') cpoints:SetPoint('RIGHT', self, 'LEFT', -9, 0) cpoints:SetJustifyH('RIGHT') @@ -185,21 +198,6 @@ local function Shared(self, unit) spark:SetTexture(1, 1, 1) castbar.Spark = spark - if(unit ~= 'target') then - local powerValue = health:CreateFontString(nil, 'OVERLAY') - powerValue:SetPoint('LEFT', health, 2, 0) - powerValue:SetPoint('RIGHT', healthValue, 'LEFT', -3) - powerValue:SetFont(FONT, 8, 'OUTLINEMONOCHROME') - powerValue:SetJustifyH('LEFT') - powerValue.frequentUpdates = 0.1 - self:Tag(powerValue, '[p3lim:power][ >p3lim:druid][ | >p3lim:spell]') - else - castbar.PostCastStart = PostUpdateCast - castbar.PostCastInterruptible = PostUpdateCast - castbar.PostCastNotInterruptible = PostUpdateCast - castbar.PostChannelStart = PostUpdateCast - end - local raidicon = health:CreateTexture(nil, 'OVERLAY') raidicon:SetPoint('TOP', self, 0, 8) raidicon:SetSize(16, 16) -- 1.7.9.5