Thread Tools Display Modes
10-16-10, 07:56 AM   #21
yj589794
A Rage Talon Dragon Guard
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 314
The values returned by the Blizzard API do not tie directly into the information you want to display.

Code:
local power = UnitPower(unit, SPELL_POWER_ECLIPSE)
The above is the API call to get the current eclipse value, with the returned value being between -100 and 100 inclusive.

The value is negative when you are towards solar power, and positive when you are towards lunar power.
  Reply With Quote
10-16-10, 09:18 AM   #22
azsh
A Fallenroot Satyr
Join Date: May 2010
Posts: 21
Originally Posted by yj589794 View Post
The value is negative when you are towards solar power, and positive when you are towards lunar power.
hmm no negative value is when player gets eclipse buff and positive is when buff ends and need 50 energy to gets next eclipse. This api display 4 stages ;/

1: 100 - 0 player has solar eclipse
2: 0 - (-100) player eclipse ends and player has no buff
3: (-100) - 0 player has lunar eclipse
4: 0 - 100 player eclipse ends and player has no buff

im trying write tag which display 2 stages

player gets solar eclipse then display
0 - 100
at 100 energy player gets lunar eclipse and tag display another
0 - 100
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » EclipseBar


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