Cooldown timer not showing
leonardbh opened this issue · 20 comments
PTR 4.3.0 (14899)
Only tested on rogue and DK, but whenever you activate a CD, you must switch your "presence" (to frost, blood, etc) to get the cooldown timer to show up. Similar situation with rogues, you must go stealth or unstealth for a timer to show up. Renamed "WTF" folder to ensure its clear, using version 4.2.3.
Dragging the icon off the bar and back on it seems to refresh also, some icons refresh after 10 seconds others never refresh.
Renaming Cache and Data/Cache doesn't seem to help either, change DX to 11 from 9, changed various graphics settings.
If you open spell book and cast spells the timers update immediately, so must be an issue with action bar "frame".
Hum... nothing changed in the timer system that I'm aware of. Are you using the "Improve Performance" option?
@Tuller, what do ya think? You reported the same a while ago.
The behavior I'm noticing on the PTR that's new:
- I cast sprint on my rogue, the cooldown spiral starts.
- Once the sprint buff runs out, OmniCC's timer shows up.
Note that I'm testing with just the stock action bars, as Blizzard has redone the event structure for action bars by a large amount in 4.3
More notes: My assumption here was that Cooldown.SetCooldown was fired, but for a future time. That would explain why OmniCC was not showing up. What's actually happening, however, is that Cooldown.SetCooldown isn't even fired in many circumstances anymore. I've made a post here to see if Blizzard can give me any info:
http://us.battle.net/wow/en/forum/topic/3424799129
HOLY &%$∞¢⁄fi¡fl¢! If they're changing that behavior, it could kill OmniCC in one shot.
Let's hope it's a bug (seems like one). I would comment on the topic, but I'm an EU user :P. Can't help on the forums.
http://us.battle.net/wow/en/forum/topic/3424799129#5
Basically, its not a bug, but we can definitely not rely on CooldownModel.SetCooldown to always be fired for action bar cooldown stuff (and thus the main method that OmniCC uses for watching cooldowns won't work anymore).
I'll play around with a new method tonight, I think. However, the big deal is that OmniCC can't really be universal going forward like it once was.
That's not bad, that's awful.
On Nov 2, 2011, at 7:53 PM, Jason Greer wrote:
http://us.battle.net/wow/en/forum/topic/3424799129#5
Basically, its not a bug, but we can definitely not rely on CooldownModel.SetCooldown to always be fired for action bar cooldown stuff (and thus the main method that OmniCC uses for watching cooldowns won't work anymore).
I'll play around with a new method tonight, I think. However, the big deal is that OmniCC can't really be universal going forward like it once was.
Reply to this email directly or view it on GitHub:
#29 (comment)
Well, Iriel asked for people to post suggestions for specific problems with the new rendering engine. I think we should leave some suggestions there.
I have no idea how the C layer is coded, or what the SetActionUIButton is (is it new, or already existed?), but why not making the CooldownModel have an "OnStart" script? My guess is it should have no hit on the performance of the default UI, while allowing add ons to register and screw it up :P
@Tuller I can't post suggestions myself. If you find the solution reasonable, please post it on the forums.
Here's my evil workaround for the moment:
if ActionBarButtonEventsFrame.frames then
local hooked = {}
local active = {}
local abEventWatcher = CreateFrame('Frame'); abEventWatcher:Hide()
abEventWatcher:SetScript('OnEvent', function(self, event)
for cooldown in pairs(active) do
local button = cooldown:GetParent()
local start, duration, enable = GetActionCooldown(button.action)
cooldown:SetCooldown(start, duration)
end
end)
abEventWatcher:RegisterEvent('ACTIONBAR_UPDATE_COOLDOWN')
local function cooldown_OnShow(self)
active[self] = true
end
local function cooldown_OnHide(self)
active[self] = nil
end
local function actionButton_Register(frame)
local cooldown = frame.cooldown
if not hooked[cooldown] then
cooldown:HookScript('OnShow', cooldown_OnShow)
cooldown:HookScript('OnHide', cooldown_OnHide)
hooked[cooldown] = true
end
end
for i, frame in pairs(ActionBarButtonEventsFrame.frames) do
actionButton_Register(frame)
end
hooksecurefunc('ActionBarButtonEventsFrame_RegisterFrame', actionButton_Register)
end
Wow, you're fast crawling blizz stuff! I don't have that patience :P
But will this work with all action bars? Or only the default?
Anyway, what do you think about my "suggestion to blizzard"?
On Nov 2, 2011, at 10:39 PM, Jason Greer wrote:
Here's my evil workaround for the moment:
if ActionBarButtonEventsFrame.frames then local hooked = {} local active = {} local abEventWatcher = CreateFrame('Frame'); abEventWatcher:Hide() abEventWatcher:SetScript('OnEvent', function(self, event) for cooldown in pairs(active) do local button = cooldown:GetParent() local start, duration, enable = GetActionCooldown(button.action) cooldown:SetCooldown(start, duration) end end) abEventWatcher:RegisterEvent('ACTIONBAR_UPDATE_COOLDOWN') local function cooldown_OnShow(self) active[self] = true end local function cooldown_OnHide(self) active[self] = nil end local function actionButton_Register(frame) local cooldown = frame.cooldown if not hooked[cooldown] then cooldown:HookScript('OnShow', cooldown_OnShow) cooldown:HookScript('OnHide', cooldown_OnHide) hooked[cooldown] = true end end for i, frame in pairs(ActionBarButtonEventsFrame.frames) do actionButton_Register(frame) end hooksecurefunc('ActionBarButtonEventsFrame_RegisterFrame', actionButton_Register) end
Reply to this email directly or view it on GitHub:
#29 (comment)
It'll work with any actionbar addon that reuses blizzard's action
button code (ex, dominos). We'll probably end up needing to write
plugins for other bar addons.
Jason
On Nov 2, 2011, at 7:10 PM, "João Libório Cardoso"
[email protected]
wrote:
Wow, you're fast crawling blizz stuff! I don't have that patience :P
But will this work with all action bars? Or only the default?Anyway, what do you think about my "suggestion to blizzard"?
On Nov 2, 2011, at 10:39 PM, Jason Greer wrote:
Here's my evil workaround for the moment:
if ActionBarButtonEventsFrame.frames then local hooked = {} local active = {} local abEventWatcher = CreateFrame('Frame'); abEventWatcher:Hide() abEventWatcher:SetScript('OnEvent', function(self, event) for cooldown in pairs(active) do local button = cooldown:GetParent() local start, duration, enable = GetActionCooldown(button.action) cooldown:SetCooldown(start, duration) end end) abEventWatcher:RegisterEvent('ACTIONBAR_UPDATE_COOLDOWN') local function cooldown_OnShow(self) active[self] = true end local function cooldown_OnHide(self) active[self] = nil end local function actionButton_Register(frame) local cooldown = frame.cooldown if not hooked[cooldown] then cooldown:HookScript('OnShow', cooldown_OnShow) cooldown:HookScript('OnHide', cooldown_OnHide) hooked[cooldown] = true end end for i, frame in pairs(ActionBarButtonEventsFrame.frames) do actionButton_Register(frame) end hooksecurefunc('ActionBarButtonEventsFrame_RegisterFrame', actionButton_Register) end
Reply to this email directly or view it on GitHub:
#29 (comment)Reply to this email directly or view it on GitHub:
#29 (comment)
Hope Cornucopia fits into that pool :P
On Nov 2, 2011, at 11:22 PM, Jason Greer wrote:
It'll work with any actionbar addon that reuses blizzard's action
button code (ex, dominos). We'll probably end up needing to write
plugins for other bar addons.Jason
On Nov 2, 2011, at 7:10 PM, "João Libório Cardoso"
[email protected]
wrote:Wow, you're fast crawling blizz stuff! I don't have that patience :P
But will this work with all action bars? Or only the default?Anyway, what do you think about my "suggestion to blizzard"?
On Nov 2, 2011, at 10:39 PM, Jason Greer wrote:
Here's my evil workaround for the moment:
if ActionBarButtonEventsFrame.frames then local hooked = {} local active = {} local abEventWatcher = CreateFrame('Frame'); abEventWatcher:Hide() abEventWatcher:SetScript('OnEvent', function(self, event) for cooldown in pairs(active) do local button = cooldown:GetParent() local start, duration, enable = GetActionCooldown(button.action) cooldown:SetCooldown(start, duration) end end) abEventWatcher:RegisterEvent('ACTIONBAR_UPDATE_COOLDOWN') local function cooldown_OnShow(self) active[self] = true end local function cooldown_OnHide(self) active[self] = nil end local function actionButton_Register(frame) local cooldown = frame.cooldown if not hooked[cooldown] then cooldown:HookScript('OnShow', cooldown_OnShow) cooldown:HookScript('OnHide', cooldown_OnHide) hooked[cooldown] = true end end for i, frame in pairs(ActionBarButtonEventsFrame.frames) do actionButton_Register(frame) end hooksecurefunc('ActionBarButtonEventsFrame_RegisterFrame', actionButton_Register) end
Reply to this email directly or view it on GitHub:
#29 (comment)Reply to this email directly or view it on GitHub:
#29 (comment)Reply to this email directly or view it on GitHub:
#29 (comment)
Based off a quick pass at your code, it should probably work.
On Nov 2, 2011, at 7:23 PM, João Libório Cardoso wrote:
Hope Cornucopia fits into that pool :P
On Nov 2, 2011, at 11:22 PM, Jason Greer wrote:
It'll work with any actionbar addon that reuses blizzard's action
button code (ex, dominos). We'll probably end up needing to write
plugins for other bar addons.Jason
On Nov 2, 2011, at 7:10 PM, "João Libório Cardoso"
[email protected]
wrote:Wow, you're fast crawling blizz stuff! I don't have that patience :P
But will this work with all action bars? Or only the default?Anyway, what do you think about my "suggestion to blizzard"?
On Nov 2, 2011, at 10:39 PM, Jason Greer wrote:
Here's my evil workaround for the moment:
if ActionBarButtonEventsFrame.frames then local hooked = {} local active = {} local abEventWatcher = CreateFrame('Frame'); abEventWatcher:Hide() abEventWatcher:SetScript('OnEvent', function(self, event) for cooldown in pairs(active) do local button = cooldown:GetParent() local start, duration, enable = GetActionCooldown(button.action) cooldown:SetCooldown(start, duration) end end) abEventWatcher:RegisterEvent('ACTIONBAR_UPDATE_COOLDOWN') local function cooldown_OnShow(self) active[self] = true end local function cooldown_OnHide(self) active[self] = nil end local function actionButton_Register(frame) local cooldown = frame.cooldown if not hooked[cooldown] then cooldown:HookScript('OnShow', cooldown_OnShow) cooldown:HookScript('OnHide', cooldown_OnHide) hooked[cooldown] = true end end for i, frame in pairs(ActionBarButtonEventsFrame.frames) do actionButton_Register(frame) end hooksecurefunc('ActionBarButtonEventsFrame_RegisterFrame', actionButton_Register) end
Reply to this email directly or view it on GitHub:
#29 (comment)Reply to this email directly or view it on GitHub:
#29 (comment)Reply to this email directly or view it on GitHub:
#29 (comment)Reply to this email directly or view it on GitHub:
#29 (comment)
Yeah, thought so.
I'm not hosting on github because it would require a large amount of repositories. Too much trouble.
On Nov 3, 2011, at 1:54 AM, Jason Greer wrote:
Based off a quick pass at your code, it should probably work.
On Nov 2, 2011, at 7:23 PM, João Libório Cardoso wrote:
Hope Cornucopia fits into that pool :P
On Nov 2, 2011, at 11:22 PM, Jason Greer wrote:
It'll work with any actionbar addon that reuses blizzard's action
button code (ex, dominos). We'll probably end up needing to write
plugins for other bar addons.Jason
On Nov 2, 2011, at 7:10 PM, "João Libório Cardoso"
[email protected]
wrote:Wow, you're fast crawling blizz stuff! I don't have that patience :P
But will this work with all action bars? Or only the default?Anyway, what do you think about my "suggestion to blizzard"?
On Nov 2, 2011, at 10:39 PM, Jason Greer wrote:
Here's my evil workaround for the moment:
if ActionBarButtonEventsFrame.frames then local hooked = {} local active = {} local abEventWatcher = CreateFrame('Frame'); abEventWatcher:Hide() abEventWatcher:SetScript('OnEvent', function(self, event) for cooldown in pairs(active) do local button = cooldown:GetParent() local start, duration, enable = GetActionCooldown(button.action) cooldown:SetCooldown(start, duration) end end) abEventWatcher:RegisterEvent('ACTIONBAR_UPDATE_COOLDOWN') local function cooldown_OnShow(self) active[self] = true end local function cooldown_OnHide(self) active[self] = nil end local function actionButton_Register(frame) local cooldown = frame.cooldown if not hooked[cooldown] then cooldown:HookScript('OnShow', cooldown_OnShow) cooldown:HookScript('OnHide', cooldown_OnHide) hooked[cooldown] = true end end for i, frame in pairs(ActionBarButtonEventsFrame.frames) do actionButton_Register(frame) end hooksecurefunc('ActionBarButtonEventsFrame_RegisterFrame', actionButton_Register) end
Reply to this email directly or view it on GitHub:
#29 (comment)Reply to this email directly or view it on GitHub:
#29 (comment)Reply to this email directly or view it on GitHub:
#29 (comment)Reply to this email directly or view it on GitHub:
#29 (comment)Reply to this email directly or view it on GitHub:
#29 (comment)
SetActionUIButton can definitely work. The main thing you'll still need to do, though, is handle every button that's already called that function before OmniCC was loaded (the Blizzard stuff, most likely).
After looking at the new blizzard code, I think I figured out a solution that should make OmniCC to work on all action bars:
In the new patch there are two ways to make cool-downs
- The "old" way, making a CooldownModel and calling :SetCooldown(start, duration)
- The new way, making an action button and a cool down model and registering it with SetActionUIButton(button, action, cooldownModel)
So let's hook both. We keep hooking the old method, as always have, but also hook the SetActionUIButton. This has several advantages from hooking ActionBarButtonEventsFrame_RegisterFrame:
- We are sure all add-ons must register into it.
- Both the cool down and the action are provided into the method, allowing your evil workaround to work on any registered action button.
Now, I don't think we should call :SetCooldown on the hacked buttons, we should just call our hook.
What's the bottom line? I'm eviler!
Yes, forgot about that. Then we must also iterate ActionBarButtonEventsFrame.frames, as you were doing in your evil example, and tell action bar add-on authors to set OmniCC as an optional dependency if they want it to work on their mod.