UNIT_SPELLCAST_SENT not firing
For some reason, I'm not seeing UNIT_SPELLCAST_SENT firing for me (or more likely I'm not bound to it somehow).
I tried building a new frame from the console in game and registering on that (shamelessly stolen from a post by haste a few years ago) and that does catch the event as expected: Lua Code:
You can see the code here: Github, but the general idea is that it's calling oUF:RegisterEvent and passing a callback function. I'm doing this with other events successfully. Any thoughts or areas to look at would be greatly appreciated. Thanks! |
Seems to fire ok for me in a short test, any specific circumstances?
|
Have you tried checking before your "caster" check?
Have you tried forcing the event to be unitless (just for the sake of testing) by setting the 3rd argument of frame:RegisterEvent() to true? |
Quote:
|
Quote:
So, if you register say UNIT_HEALTH on your player frame, the function will only fire if the event fired for the player unit. The 3rd argument to frame:RegisterEvent() is to override this check, which is why the argument is called "unitless" See this source for more details: https://github.com/haste/oUF/blob/ma...s.lua#L53-L100 In the past, oUF's event handler checked everything itself, but somewhere during Cata or Mists we got a new method called RegisterUnitEvent to do this work for us, and is what oUF uses today. |
Ah, that makes sense. Thanks for the explanation.
|
All times are GMT -6. The time now is 10:29 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI