Currently throttled events appear to work this way:
MyAddon:OnEnable()
self:RegisterEvent("SOME_WOW_EVENT", 0.5)
end
0.00: SOME_WOW_EVENT -> MyAddon:SOME_WOW_EVENT is called
0.10: SOME_WOW_EVENT -> ignored
0.11: SOME_WOW_EVENT -> ignored
0.50: SOME_WOW_EVENT -> MyAddon:SOME_WOW_EVENT is called
0.51: SOME_WOW_EVENT -> ignored
I think it would be much more intuitive (and useful too) if throttled events worked as follows:
0.00: SOME_WOW_EVENT -> MyAddon:SOME_WOW_EVENT is called
0.10: SOME_WOW_EVENT -> ignored
0.11: SOME_WOW_EVENT -> ignored
0.50: SOME_WOW_EVENT -> MyAddon:SOME_WOW_EVENT is called
0.51: SOME_WOW_EVENT -> ignored
1.00: OnUpdate -> MyAddon:SOME_WOW_EVENT is called because SOME_WOW_EVENT fired since the last time MyAddon:SOME_WOW_EVENT was called and throttleRate seconds have elapsed
So why not use bucket events? They don't trigger until after the delay has passed.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I think it would be much more intuitive (and useful too) if throttled events worked as follows:
So why not use bucket events? They don't trigger until after the delay has passed.