Multiple Event Filters?
So I'm following the Wiki on how to add multiple filters for the same event and I'm stumped. According to the Wiki:
Quote:
My code for method 1: Code:
EVENT_MANAGER:RegisterForEvent(SFR.addonName, EVENT_EFFECT_CHANGED, SFR.OnEffectChanged) Code:
EVENT_MANAGER:RegisterForEvent(SFR.addonName, EVENT_EFFECT_CHANGED, SFR.OnEffectChanged) Thanks in advance for any help! |
Pretty obvious question: why not filter effects inside your function, rather than try to break your brain? :D
|
Don't get me wrong it had crossed my mind, I just wanted to see if there was an advantage to using the built-in filter or not. If it doesn't work that is exactly what I will be doing.
|
you need something like this:
lua Code:
|
Thank you for the reply, I wil experiment with it :D
|
Quote:
Pretty obvious answer: Because it's better. Using the filters on the Event Manger is better for performance, since the game does the filtering in the C code rather than Lua. For stuff with abilities which can fire a lot, this means you have less lag in places where it matters the most: Combat. |
Short, what Scootworks want to say:
The eventFilters need unique names as 1st parameter |
Quote:
|
Quote:
But afai remember I even had to change the event name in order to get the multiple ability id's to work at the same time. |
Quote:
|
All times are GMT -6. The time now is 06:28 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI