Thread Tools Display Modes
06-12-09, 03:57 PM   #1
Cralor
Mmm... cookies!!!
 
Cralor's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2007
Posts: 772
Rune cooldowns and GetRuneCooldown()

Hey. I'm running into an issue that I'd like to clarify here.

For one, whenever I use a Frost-type spell, it triggers the Unholy rune's cooldown (Blizzard-created). If I use an Unholy-type spell, it triggers the Frost rune's cooldown. And the Blood runes just do not show a cooldown.

At the same time, my addon's function to make the runes darker when they are not usable is working 90% of the time. It might not get darker while a rune is doing its cooldown, or it might. It always works for the Blood runes, and it only works for the Frost ones once I used up my Unholy runes.

To make things shorter: my own addon's function is working fine (but not 100% effectively), but it is interfering with the Blizzard code in some way to make the cooldown frame messed up. I must be interfering with the Blizzard code in some way or another.

Here is my code: http://pastey.net/115911/51:156

If you need to see the addon in action, I can send a PM with an attached file of my current local revision.

Thank you for your time!
__________________
Never be satisfied with satisfactory.
  Reply With Quote
06-15-09, 02:13 PM   #2
Cralor
Mmm... cookies!!!
 
Cralor's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2007
Posts: 772
Anyone got an idea?
__________________
Never be satisfied with satisfactory.
  Reply With Quote
06-15-09, 02:50 PM   #3
Slakah
A Molten Giant
 
Slakah's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2007
Posts: 863
Just taking a glance over your code and your doing this:
Code:
runes[rune]:SetScript("OnUpdate", function(self, elapsed) Button_OnUpdate(self, elapsed, runes[rune]:GetID()) end);
Which I have a feeling will be overwriting Blizzards OnUpdate thus causing your problem.

I'll take a deeper look into it tomorrow but I need sleep :P.
  Reply With Quote
06-15-09, 04:34 PM   #4
Akryn
A Firelord
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 479
Originally Posted by Slakah View Post
Just taking a glance over your code and your doing this:
Code:
runes[rune]:SetScript("OnUpdate", function(self, elapsed) Button_OnUpdate(self, elapsed, runes[rune]:GetID()) end);
Which I have a feeling will be overwriting Blizzards OnUpdate thus causing your problem.

I'll take a deeper look into it tomorrow but I need sleep :P.
Oh of course that's it; dunno how I missed that. You'll want to use :HookScript() instead.
  Reply With Quote
06-15-09, 04:38 PM   #5
Cralor
Mmm... cookies!!!
 
Cralor's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2007
Posts: 772
Thanks

I'll see how this pans out.
__________________
Never be satisfied with satisfactory.
  Reply With Quote
06-15-09, 06:40 PM   #6
Cralor
Mmm... cookies!!!
 
Cralor's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2007
Posts: 772
The success rate of the function seems to be better so I think the HookScript helped.

Does anyone happen to know how I can hide the Blizzard cooldown overlay?

I've been trying this:
Code:
local cooldown = _G["RuneButtonIndividual"..i.."Cooldown"]
cooldown:Hide()
Doesn't seem to work.

Also, I'm trying to figure out how to tell if the default runes are active.

I've tried:
if RMDB.images == "0"
local setting
artwork file path check

None seem to work witch is odd. Any ideas? Probably an obvious one I am missing that could be used.

Thanks.
__________________
Never be satisfied with satisfactory.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Rune cooldowns and GetRuneCooldown()


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