Thread Tools Display Modes
12-29-12, 03:24 AM   #1
andaril
A Murloc Raider
 
andaril's Avatar
Join Date: Oct 2012
Posts: 4
demonic fury number on powerbar

I'm using ouf_drk with little changes.
http://www.wowinterface.com/download...Fanupdate.html

Is there any way to show current number of demonic fury on fury bar?
Just want to get some advices what functions i must use and there?
Should i do it through tags or smth else?

ps: is there any good mans about blizz functions? any links?
  Reply With Quote
12-29-12, 05:22 AM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
WoW API documentation:
For your specific question, demonic fury is just a type of power, like mana or energy, so you get the current and maximum values by calling the UnitPower and UnitPowerMax functions with the desired unit and power type, and the UNIT_POWER and UNIT_POWER_FREQUENT events fire to notify you of changes.

Code:
local current = UnitPower("player", SPELL_POWER_DEMONIC_FURY)
local maximum = UnitPowerMax("player", SPELL_POWER_DEMONIC_FURY)
print(format("Demonic Fury: %d/%d (%d%%).", current, maximum, current / maximum))
... will print something like "Demonic Fury: 642/1000 (64%)" in your chat frame.

If the layout you're working with (I'm not familiar with it) does not already have a font string on the demonic fury bar, you'd need to add one and then add some code to update the text inside the function the layout uses to update the bar.

As an alternative to updating the text directly, you could create a tag and apply it to the font string.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » demonic fury number on powerbar


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off