NO UPDATES FOR 3.0
Add this to your layout instead!
Code:
local function PreUpdatePower(self, event, unit)
ifi(self.unit ~= 'player') then return end
local _, powertype = UnitPowerType('player')
local min = UnitPower('player', SPELL_POWER_MANA)
local max = UnitPowerMax('player', SPELL_POWER_MANA)
self.DruidMana:SetMinMaxValues(0, max)
self.DruidMana:SetValue(min)
if(min ~= max) then
self.DruidMana.Text:SetFormattedText('%d%%', math.floor(min / max * 100))
else
self.DruidMana.Text:SetText()
end
self.DruidMana:SetAlpha((powertype ~= 0) and 1 or 0)
self.DruidMana.Text:SetAlpha((powertype ~= 0) and 1 or 0)
end
Change Log - oUF DruidMana
30000.12-Beta:
- Removed LibDruidMana
- Reworked for 3.0 changes
Originally posted by Aranarth You can now call UnitPower("player", SPELL_POWER_MANA) and UnitPowerMax("player", SPELL_POWER_MANA) inside the UNIT_MANA event when in cat/bear form. No need for LibDruidMana-1.0 anymore. Enjoy
EDIT: sorry i thought it was a WotLK addon :P
This addon is not updated to 3.0 (yet), but thanks for the heads up
You can now call UnitPower("player", SPELL_POWER_MANA) and UnitPowerMax("player", SPELL_POWER_MANA) inside the UNIT_MANA event when in cat/bear form. No need for LibDruidMana-1.0 anymore. Enjoy
Originally posted by Quokka there is a error in r10
Interface\AddOns\oUF_DruidMana\oUF_DruidMana.lua:5: Attempt to find 'this' in non-table object (used '.' instead of ':' ?)
[C]: ?
[C]: in function `?'
Interface\AddOns\oUF_DruidMana\oUF_DruidMana.lua:5: in function <Interface\AddOns\oUF_DruidMana\oUF_DruidMana.lua:4>
Interface\AddOns\oUF_DruidMana\oUF_DruidMana.lua:11: in function `?'
Interface\AddOns\oUF\ouf.lua:82: in function <Interface\AddOns\oUF\ouf.lua:80>
Interface\AddOns\oUF_DruidMana\oUF_DruidMana.lua:5: Attempt to find 'this' in non-table object (used '.' instead of ':' ?)
[C]: ?
[C]: in function `?'
Interface\AddOns\oUF_DruidMana\oUF_DruidMana.lua:5: in function <Interface\AddOns\oUF_DruidMana\oUF_DruidMana.lua:4>
Interface\AddOns\oUF_DruidMana\oUF_DruidMana.lua:11: in function `?'
Interface\AddOns\oUF\ouf.lua:82: in function <Interface\AddOns\oUF\ouf.lua:80>
Originally posted by manix Just one thing - If you wonder why the hell the druid mana bar is not showing, then you have to set some texture at that line:
Code:
self.DruidMana:SetStatusBarTexture(texture)
Its kinda obvious, and its only used as an example.