WatchItemCooldown events don't get checked when registered in TSU Custom Variables
Boneshockx opened this issue ยท 1 comments
Describe the bug
Events from WeakAuras.WatchItemCooldown() and WatchSpellCooldown() in a TSU Custom Variable aren't checked when they fire.
"ITEM_COOLDOWN_CHANGED"
"ITEM_COOLDOWN_READY"
"SPELL_COOLDOWN_CHANGED"
"SPELL_COOLDOWN_READY"
To Reproduce
Steps to reproduce the behavior:
- Use WeakAuras.WatchItemCooldown(id)
- Have a TSU with custom variable like this:
onCooldown = {
display = "On Cooldown",
type = "bool",
test = function(state, needle)
return (state.expirationTime > GetTime()) == (needle == 1)
end,
events = {
"ITEM_COOLDOWN_READY", "ITEM_COOLDOWN_CHANGED"
}
}
- Have a condition that checks On Cooldown == true (and e.g. desatures)
- Use item
- aura doesn't desaturate, or unsatures when it get's off cooldown.
Did you try having WeakAuras as the only enabled addon and everything else (especially something like ElvUI) disabled?
No
Which version of WeakAuras are you using?
3.1.2
Are you on World of Warcraft Classic or Retail?
- Classic
- Retail
Was it working in a previous version? If yes, which was the last good one?
No clue
Additional Info
Registering the events to the TSU itself does make the condition check function like it should. But when registering the events separately in the CustomVariables it will not.
I haven't tested if it's the same for WatchSpellCooldown(), I only assume it behaves the same.
Yes that's intended for now.
Two reasons:
- These functions are internal and thus their behaviour is whatever their behaviour is. And there's no gurantee that they'll behave like that tomorrow. (Though likely no change until a expansion.)
So, making them work with custom condition checks is future backward compability break, which I'd rather avoid.
- The system that fires those events is inside the generic trigger system. That's different from the conditions, which are trigger-independant. So making it work requires some coordination between systems that are supposed to be independant.
Neither of these reasons are very strong, but there's also a trivial work-around by making your trigger listen to these events.
So at the moment, I'd rather not go down this road.