Thread Tools Display Modes
Prev Previous Post   Next Post Next
06/22/15, 10:37 AM   #13
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
 

ESOUI » Developer Discussions » General Authoring Discussion » Upcoming Combat and Effect API Changes


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off