View Single Post
06-17-09, 10:36 AM   #9
spiel2001
nUI's Author
 
spiel2001's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 7,724
No -- I understood exactly what you were saying -- I have a lvl50 ret pally I play (well, I haven't played him in months, but I did at least level him ~lol~)

The problem is that the action button does not say "Judgment of Light" -- It says "Judgment" and which judgment it is depends on which seal was active when you cast it. The problem is that the aura that's active on the target is neither "Seal of Light" (which would cause the timer to appear on the seal action button) or "Judgment" (which would cause it to appear on the judgment action button)

It's a complicated system unfortunately... nUI has to call GetEffectiveAction() to find out what the actually applicable action of the button is (it can change based on which action page is active, whether or not you're shapeshifted, stealth or in an alternate stance, mind controlling (possessing) a player/mob and/or mounted on a vehicle.

Once I know the effective action, then I have to figure out which spell that action is, then look at the target and see if there's an aura active on the target with the same spell name. If there is, then I can query the aura to find out how much longer the spell will be active before it expires and that's the number that gets displayed.

If I cannot make the connection between the effective action on the action bar and the active auras on the target, then there's no way for me to determine how much longer the spell will be active.

Since "Judgment" =/= "Judgment of Light" I can't make that determination programmatically. I would have to have a database of spell names and match those to aura names and that database would have to support all of the languages nUI supports... so, as you can see, the problem starts to explode in complexity pretty quickly.

EDIT: The same is true for the warrior example I gave... the "effective action" on his "Devastate" action button is a number. I call GetActionInfo( effectiveAction ) to get the name of the action in the localized language -- which is "Devastate" -- then I look at the target to see if there's a "Devastate" spell active on the target... only the spell that gets cast on the target by the "Devastate" action is actually "Sunder" -- so even though sunder is active and should be displaying a counter on the devastate action button, no timer shows. Same as the Judgment button on a pally... the aura that appears on the target is not the same name as the action that caused it.
__________________

What people don't get is that I am, ultimately, an artist at heart.
My brush has two colors, 1 and 0, and my canvas is made of silicon.



Official nUI Web Site: http://www.nUIaddon.com
Official nUI Support Forum: http://forums.nUIaddon.com
My day job: http://www.presidio.com/

Last edited by spiel2001 : 06-17-09 at 10:41 AM.