From 99c4f54706bba7c07fa87c48ff80b9781f46d42c Mon Sep 17 00:00:00 2001 From: Adrian L Lange Date: Tue, 1 Sep 2009 21:52:12 +0200 Subject: [PATCH] Fix and clean up the castbar moving --- oUF_P3lim.lua | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/oUF_P3lim.lua b/oUF_P3lim.lua index e0fdfcc..2efe3cc 100644 --- a/oUF_P3lim.lua +++ b/oUF_P3lim.lua @@ -214,7 +214,7 @@ local function style(self, unit) self.Power.bg.multiplier = 0.3 self.Castbar = CreateFrame('StatusBar', nil, self) - self.Castbar:SetWidth(self.Health:GetWidth() - 25) + self.Castbar:SetWidth(unit == 'pet' and 105 or 205) self.Castbar:SetHeight(16) self.Castbar:SetStatusBarTexture(minimalist) self.Castbar:SetStatusBarColor(0.25, 0.25, 0.35) @@ -241,6 +241,16 @@ local function style(self, unit) self.Castbar.Icon = self.Castbar.Button:CreateTexture(nil, 'ARTWORK') self.Castbar.Icon:SetAllPoints(self.Castbar.Button) self.Castbar.Icon:SetTexCoord(0.08, 0.92, 0.08, 0.92) + + if(unit == 'target') then + self.PostCastStart = castIcon + self.PostChannelStart = castIcon + self.Castbar:SetPoint('TOPLEFT', self, 'BOTTOMLEFT', 0, -60) + self.Castbar.Button:SetPoint('BOTTOMLEFT', self.Castbar, 'BOTTOMRIGHT', 4, 0) + else + self.Castbar:SetPoint('TOPRIGHT', self, 'BOTTOMRIGHT', 0, -60) + self.Castbar.Button:SetPoint('BOTTOMRIGHT', self.Castbar, 'BOTTOMLEFT', -4, 0) + end end if(unit == 'player' or unit == 'pet') then @@ -309,16 +319,6 @@ local function style(self, unit) self.Buffs['growth-y'] = 'DOWN' self.PostCreateAuraIcon = createAura - if(unit == 'target') then - self.PostCastStart = castIcon - self.PostChannelStart = castIcon - self.Castbar:SetPoint('TOPLEFT', self, 'BOTTOMLEFT', 0, -60) - self.Castbar.Button:SetPoint('BOTTOMLEFT', self.Castbar, 'BOTTOMRIGHT', 4, 0) - else - self.Castbar:SetPoint('TOPRIGHT', self, 'BOTTOMRIGHT', 0, -60) - self.Castbar.Button:SetPoint('BOTTOMRIGHT', self.Castbar, 'BOTTOMLEFT', -4, 0) - end - self.PostUpdatePower = updatePower end -- 1.7.9.5