View Single Post
06/22/15, 10:37 AM   #15
XanDDemoX
AddOn Author - Click to view addons
Join Date: May 2015
Posts: 28
You can make your own

(pseudo code)

Code:
local function DebugFireEvent(events,eventId,...)

    local func = events[eventId]
    if func ~= nil then
         
           func(...)

    end

end

-- Usage 

local function Event1Fired(eventCode)

end

-- lookup 
local _events = {

   [EVENT_ID_1] = Event1Fired,

   [EVENT_ID_2] = function(eventCode)

   end

}

-- register handlers any way you like with EVENT_MANAGER:RegisterForEvent 
-- as long as the function address is also in a lookup

-- Test fire events
DebugFireEvent(_events,EVENT_ID_1,...)

DebugFireEvent(_events,EVENT_ID_2,...)
  Reply With Quote