View Single Post
10/07/20, 07:13 AM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 5,028
Does anyone know how to solve this?
I doubt it's possible within 1 event and filters.

Either register an event + filter on REGISTER_FILTER_TARGET_COMBAT_UNIT_TYPE, COMBAT_UNIT_TYPE_PLAYER or REGISTER_FILTER_SOURCE_COMBAT_UNIT_TYPE, COMBAT_UNIT_TYPE_PLAYER.
And within your event's callback function then check the other case by using the callback function parameters.
e.g. if you got the filter on REGISTER_FILTER_TARGET_COMBAT_UNIT_TYPE, COMBAT_UNIT_TYPE_PLAYER -> check if parameter sourceUnitType
== "player" or different.

Depending on the amount of events fired you would need to check which combination would be the best to prefilter at C code, and the rest of the incoming events need to be filtered in your lua code then.
  Reply With Quote