Quantcast

Added global names

p3lim-52096 [03-20-09 - 20:10]
Added global names
Added another event to the druidpower function

git-svn-id: svn://svn.wowinterface.com/oUF_P3lim-52/trunk@66 8c7459ed-49dc-4bc8-85d7-b6381a8f5413
Filename
oUF_P3lim/oUF_P3lim.lua
diff --git a/oUF_P3lim/oUF_P3lim.lua b/oUF_P3lim/oUF_P3lim.lua
index 4591768..beb3733 100644
--- a/oUF_P3lim/oUF_P3lim.lua
+++ b/oUF_P3lim/oUF_P3lim.lua
@@ -69,7 +69,9 @@ local function UpdateMasterLooter(self)
 	end
 end

-local function UpdateDruidPower(self)
+local function UpdateDruidPower(self, event, unit)
+	if(unit and unit ~= self.unit) then return end
+
 	local bar = self.DruidPower
 	local num, str = UnitPowerType('player')
 	local min = UnitPower('player', (num ~= 0) and 0 or 3)
@@ -352,6 +354,7 @@ local function CreateStyle(self, unit)
 			table.insert(self.__elements, UpdateDruidPower)
 			self:RegisterEvent('UNIT_MANA', UpdateDruidPower)
 			self:RegisterEvent('UNIT_ENERGY', UpdateDruidPower)
+			self:RegisterEvent('UPDATE_SHAPESHIFT_FORM', UpdateDruidPower)
 		end
 	end

@@ -477,8 +480,8 @@ end
 oUF:RegisterStyle('P3lim', CreateStyle)
 oUF:SetActiveStyle('P3lim')

-oUF:Spawn('player'):SetPoint('CENTER', UIParent, -220, -250)
-oUF:Spawn('target'):SetPoint('CENTER', UIParent, 220, -250)
-oUF:Spawn('targettarget'):SetPoint('BOTTOMRIGHT', oUF.units.target, 'TOPRIGHT', 0, 5)
-oUF:Spawn('focus'):SetPoint('BOTTOMLEFT', oUF.units.player, 'TOPLEFT', 0, 5)
-oUF:Spawn('pet'):SetPoint('RIGHT', oUF.units.player, 'LEFT', -25, 0)
\ No newline at end of file
+oUF:Spawn('player', 'oUF_P3lim_player'):SetPoint('CENTER', UIParent, -220, -250)
+oUF:Spawn('target', 'oUF_P3lim_target'):SetPoint('CENTER', UIParent, 220, -250)
+oUF:Spawn('targettarget', 'oUF_P3lim_targettarget'):SetPoint('BOTTOMRIGHT', oUF.units.target, 'TOPRIGHT', 0, 5)
+oUF:Spawn('focus', 'oUF_P3lim_focus'):SetPoint('BOTTOMLEFT', oUF.units.player, 'TOPLEFT', 0, 5)
+oUF:Spawn('pet', 'oUF_P3lim_pet'):SetPoint('RIGHT', oUF.units.player, 'LEFT', -25, 0)
\ No newline at end of file