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.