Hey guys, is it possible to check wether an event is already registered? If I register the same event multiple times, it seems not to be overwritten but registering multiple times which is very odd behavior.
Example:
Lua Code:
function AuraMastery:RegisterForEvent(eventId, abilityId)
local eventNamespace = "AM_"..eventId..abilityId
local eventHandler = MyHandler
EVENT_MANAGER:RegisterForEvent(eventNamespace, eventId, eventHandler)
EVENT_MANAGER:AddFilterForEvent(eventNamespace, eventId, REGISTER_FILTER_ABILITY_ID, abilityId)
end
AuraMastery:RegisterForEvent(EVENT_COMBAT_EVENT, 30920)
AuraMastery:RegisterForEvent(EVENT_COMBAT_EVENT, 30920)
Any use of ability(30920) will trigger MyHandler TWO TIMES! instead of one time.
I need a function to determine if an event of specified Namespace and filter /w abilityId is already registered.
(I know I could handle it manually by saving it to a table onRegistering, but maybe there is a more elegant way