I'm currently preparing my addon for MoP.
I've started with the Warlock class where I've found out by experimenting that:
UnitPower('player', 15) = Demonic Fury
UnitPower('player', 7) = Soul Shards
UnitPower('player', 14) = Burning Embers*
So is there any 'top-secret' (easy) way of getting the 'real' amount of Burning Embers?
edit: I think I see what you're asking, maybe. Here's how the Blizzard GUI is currently updated ("self" here is the embers bar, and "self.emberN" is a specific ember graphic). I've elided some extraneous stuff for brevity. Comments are Blizzard's except for the obvious "...." pseudocode text.
local MAX_POWER_PER_EMBER = 10
function BurningEmbersBar_Update(self, powerType, forceUpdate)
local maxPower = UnitPowerMax("player", SPELL_POWER_BURNING_EMBERS, [b]true[/b])
local power = UnitPower("player", SPELL_POWER_BURNING_EMBERS, [b]true[/b])
local numEmbers = floor(maxPower / MAX_POWER_PER_EMBER)
if ( self.emberCount ~= numEmbers ) then
if ( numEmbers == 3 ) then
self.ember1:SetPoint("TOPLEFT", 17, 7)
self.ember2:SetPoint("LEFT", self.ember1, 40, 0)
self.ember3:SetPoint("LEFT", self.ember2, 40, 0)
self.ember4.active = false
self.ember1:SetPoint("TOPLEFT", 16, 7)
self.ember2:SetPoint("LEFT", self.ember1, 26, 0)
self.ember3:SetPoint("LEFT", self.ember2, 26, 0)
self.emberCount = numEmbers
self.power = power
self.maxPower = maxPower
if ( forceUpdate ) then
function BurningEmbersBar_SetPower(self, power)
self.displayedPower = power
for i = 1, self.emberCount do
local ember = self["ember"..i]
WarlockPowerFrame_UpdateFill(ember.fill, WARLOCK_POWER_FILLBAR["Destruction"], power, MAX_POWER_PER_EMBER)
if ( power >= MAX_POWER_PER_EMBER ) then
.... animate the "heating up" graphics
.... animate the "smoking / cooling off" graphics
-- leftover for the other embers
power = power - MAX_POWER_PER_EMBER
That may or may not answer your question.
The WarlockPowerFrame_UpdateFill function is just handling which texcoords to use and :Show based on the warlock spec; it doesn't do anything with the current ember value other than "do we show this at all?"
Note the bolded "true"s passed in. That 3rd parameter is used nowhere else in Blizzard's code, not even for the other two warlock specs. It apparently means "use the fractional units". I printed out values while nuking a targeting dummy on my premade beta toon; by default UnitPowerMax always returned 3 and UnitPower was the 1/2/3 number of embers I had filled. With the 3rd param, UnitPowerMax returned 30 and UnitPower returned numbers like 9, 13, 24, eventually 30. So that may be what you're looking for.
I have no idea what game effect would activate the 4th hidden-by-default ember. Presumably it's in preparation for a future tier set bonus or something.
... And is there a place where one can read in detail about that kind of changes..? (wowpedia doesn't seem to provide much detail about this kind of stuff...)