Thread Tools Display Modes
Prev Previous Post   Next Post Next
09-06-12, 07:35 PM   #1
Ereki
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 25
Problems with runes

Hi I made a thread about this like 2 years ago () but back then I decided to give up and just remove the problem area from the addon. And now I've decided to give it another shot but I'm not really getting any further than I did 2 years ago.

What I want to do is make a runes switch alpha depending on if they're on cooldown or not, it works well except for one thing, energize.. For those of you don't play DK a rune is energized when either Empower_Rune_Weapon, Runic_Empowerment or Blood_Tap is used. All three of those immediately refreshes a rune. To begin with here's the complete lua file of the addon http://pastebin.com/fb4G9JFV it's in a mess I know, I just can't be bothered since it works (except for this).

So the problem is that I can't get the runes to change alpha when they're energized, it works just fine every other time, I've done some digging and it appears the event RUNE_POWER_UPDATE is called twice when a rune is energized and it does some weird things.
This is when I use Blood Tap:

And this is when I use Empower Rune Weapon with every rune on CD:


The print is the following:
Code:
elseif event == "RUNE_POWER_UPDATE" and InCombatLockdown() and not UnitInVehicleControlSeat("player") then
local runeIndex, isEnergize = ...;
local runeButton = _G["RuneButtonIndividual"..runeIndex];
local start, duration, runeReady = GetRuneCooldown(runeIndex);
print(GetTime(),runeIndex,start,duration,runeReady,isEnergize)
As you can see the event is firing twice and does wierd things with isEnergize and runeReady. I've tried changing the code around (which is based on the code for energizing runes in FrameXML) right now I'm really tired and can't think straight so I figured someone here will know lua way better than me and might be able to help me.

Thanks in advance
Ereki

(And I might've done some spelling errors but it's 3:34AM here so gimmie a break :p)

Last edited by Ereki : 09-06-12 at 07:36 PM. Reason: Messed up the links
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Problems with runes


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