Posted by galvin on Wed, 30 Oct 2013 18:28:31
I can't get this to work. What I'm trying to do is use this to not play the flash animation at the end of a cooldown. http://wowpedia.org/APICooldownSetBlingDuration
I've tried 0 and tried 5000, any value doesn't change the flash animation played.
Other work arounds I tried was hiding the cooldown frame before it plays the flash. This kinda works. But when the frame is shown again the flash plays. This is because when you hide the frame you're pausing the animation instead of stopping it.
Got a code snippet showing that it doesn't work.
local myFrame = CreateFrame("Frame", nil, UIParent) myFrame:SetSize(80, 80) myFrame:SetPoint("CENTER") local myTexture = myFrame:CreateTexture() myTexture:SetAllPoints() myTexture:SetTexture("Interface\\Icons\\Ability_Druid_TreeofLife") local myCooldown = CreateFrame("Cooldown", "myCooldown", myFrame) myCooldown:SetAllPoints() myCooldown:SetCooldown(GetTime(), 1.5) myCooldown:SetBlingDuration(0)
Posted by jnwhiteh on Wed, 30 Oct 2013 21:03:19
I'm sorry, I don't have any experience with that API. Are you calling the function while the cooldown is playing, like the wowpedia docs indicate?
Posted by galvin on Wed, 30 Oct 2013 21:26:32
Yeah, I tried setting it during the cooldown animation, and during the flash animation. Tried setting it before starting the cooldown as well. Nothing works.
Posted by galvin on Thu, 31 Oct 2013 20:40:44
Got to this to work. I think blizzard intended this function only to work after a SetCoodown(0, 0). So for cooldown. I set up a timer that calculates the total time till the flash goes off using StartTIme - CurrentTime + Duration. Then when this time is reached you SetCooldown(0, 0); SetBlingDuration(0).