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 Thanks in advance Ereki (And I might've done some spelling errors but it's 3:34AM here so gimmie a break :p) |
Nothing jumps out at me, but this block can be simplified
Code:
if not runeReady and isEnergize == nil then Code:
local alpha = (runeReady or isEnergize) and RHaic or RHaoc |
Just a question, but what's the significance of isEnergize in terms of functionality? I mean, why is it not sufficient to rely only on runeReady? It appears that the event with isEnergize being true is firing before a rune is technically ready (perhaps indicating that that rune is about to be "energized", for whatever reason).
But why not just treat that as a not-ready event, ignoring isEnergize, and wait until the energize is complete and the follow-up event happens a split second later, which has runeReady as true and will fix the alpha just like a normal ready event? |
Quote:
if not runeReady then runeButton:SetAlpha(RHaoc) else runeButton:SetAlpha(RHaic) end But it gave pretty much the same results or completly broke the whole thing, can't really remember.. It didn't work at least |
All times are GMT -6. The time now is 12:18 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI