Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
5408aed
Create CHANGELOG.txt
calamath May 18, 2021
cf8b11a
Added add-on manifest file and a global variable LibEventHandler.
calamath May 18, 2021
f0db082
LibDebugLogger support
calamath May 18, 2021
6416f8c
changed version to 1.2.90 (AddOnVersion: 1290)
calamath May 18, 2021
aa07f25
changed version to 1.2.91 (AddOnVersion: 1291)
calamath May 18, 2021
4dd85b7
changed version to 1.2.92 (AddOnVersion: 1292)
calamath May 18, 2021
5848204
changed version to 1.2.93 (AddOnVersion: 1293)
calamath May 18, 2021
b6ae31f
changed version to 1.2.94 (AddOnVersion: 1294)
calamath May 18, 2021
debb343
changed version to 1.2.95 (AddOnVersion: 1295)
calamath May 19, 2021
7963803
changed version to 1.2.96 (AddOnVersion: 1296)
calamath Aug 8, 2021
a94d021
changed version to 1.2.97 (AddOnVersion: 1297)
calamath Oct 2, 2021
54adfa8
changed version to 1.2.98 (AddOnVersion: 1298)
calamath Feb 20, 2022
918f3fb
changed version to 1.2.99 (AddOnVersion: 1299)
calamath Apr 21, 2022
680c9fc
changed version to 1.3.0 (AddOnVersion: 1300)
calamath Aug 22, 2022
2d10ea1
changed version to 1.3.1 (AddOnVersion: 1301)
calamath Oct 11, 2022
9b9775a
changed version to 1.3.2 (AddOnVersion: 1302)
calamath Mar 18, 2023
36d94f3
changed version to 1.3.3 (AddOnVersion: 1303)
calamath May 8, 2023
f9186a7
changed version to 1.3.4 (AddOnVersion: 1304)
calamath Jul 19, 2023
c3fdd55
changed version to 1.3.5 (AddOnVersion: 1305)
calamath May 9, 2024
73083ba
changed version to 1.3.6 (AddOnVersion: 1306)
calamath Aug 9, 2024
f0acc92
changed version to 1.3.7 (AddOnVersion: 1307)
calamath Oct 15, 2024
c53f755
changed version to 1.3.8 (AddOnVersion: 1308)
calamath Mar 4, 2025
6da7be1
changed version to 1.3.9 (AddOnVersion: 1309)
calamath Jul 1, 2025
69adff2
changed version to 1.3.10 (AddOnVersion: 1310)
calamath Aug 18, 2025
9435bf8
changed version to 1.3.11 (AddOnVersion: 1311)
calamath Oct 16, 2025
0b29f71
changed version to 1.3.12 (AddOnVersion: 1312)
calamath Jan 28, 2026
c90b8cf
changed version to 1.3.13 (AddOnVersion: 1313)
calamath Jun 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 96 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
======================================================================
This is a modified version of LibEventHandler, originally by Justinon.
======================================================================
https://www.esoui.com/downloads/info1452-LibEventHandler.html

NOTE : this modified version is still under the Artistic License 2.0

Version 1.3.13: (Calamath)
- Updated API version to 101050 (ESO 12.0.x : Update 50)

Version 1.3.12: (Calamath)
- Updated API version to 101049 (ESO 11.3.x : Season Zero - Dawn and Dusk)

Version 1.3.11: (Calamath)
- Updated API version to 101048 (ESO 11.2.x : Seasons of the Worm Cult Part 2)

Version 1.3.10: (Calamath)
- Updated API version to 101047 (ESO 11.1.x : Feast of Shadows)

Version 1.3.9: (Calamath)
- Updated API version to 101046 (ESO 11.0.x : Seasons of the Worm Cult Part 1)

Version 1.3.8: (Calamath)
- Updated API version to 101045 (ESO 10.3.x : Fallen Banners)

Version 1.3.7: (Calamath)
- Updated API version to 101044 (ESO 10.2.x : Update 44)

Version 1.3.6: (Calamath)
- Updated API version to 101043 (ESO 10.1.x : Update 43)

Version 1.3.5: (Calamath)
- Updated API version to 101042 (ESO 10.0.x : Gold Road)

Version 1.3.4: (Calamath)
- Updated API version to 101039 (ESO 9.1.x : Update 39)

Version 1.3.3: (Calamath)
- Updated API version to 101038 (ESO 9.0.x : Necrom)

Version 1.3.2: (Calamath)
- Updated API version to 101037 (ESO 8.3.x : Scribes of Fate)

Version 1.3.1: (Calamath)
- Updated API version to 101036 (ESO 8.2.x : Firesong)

Version 1.3.0: (Calamath)
- Updated API version to 101035 (ESO 8.1.x : Lost Depths)

Version 1.2.99: (Calamath)
- Updated API version to 101034 (ESO 8.0.x : High Isle)

Version 1.2.98: (Calamath)
- Updated API version to 101033 (ESO 7.3.x : Ascending Tide)

Version 1.2.97: (Calamath)
- Updated API version to 101032 (ESO 7.2.x : Deadlands)

Version 1.2.96: (Calamath)
- Updated API version to 101031 (ESO 7.1.x : Waking Flame)

Version 1.2.95: (Calamath)
- Updated API version to 100035 (ESO 7.0.x : Blackwood)

Version 1.2.94: (Calamath)
- Updated API version to 100034 (ESO 6.3.x : Flames of Ambition)

Version 1.2.93: (Calamath)
- Updated API version to 100033 (ESO 6.2.x : Markarth)

Version 1.2.92: (Calamath)
- Updated API version to 100032 (ESO 6.1.x : Stonethorn)

Version 1.2.91: (Calamath)
- Updated API version to 100031 (ESO 6.0.x : Greymoor)

Version 1.2.90: (Calamath)
- LibEventHandler library now has its own manifest file and a global variable LibEventHandler for direct access.
- Updated API version to 100029 (ESO 5.2.5 : Dragonhold)
- LibDebugLogger has been newly added to OptionalDependsOn in the add-on manifest file.
- Moved debug message output from UI chat to LibDebugLogger. From now on, we add-on authors and contributers will look at the debug log with the DebugLogViewer add-on.

------------------------------------------------------------------------------
The following are changes to the standard version by original author Justinon.
------------------------------------------------------------------------------

Version 1.2:

- Removed a print statement


Version 1.1:

- Changed async to allow for user input for the delay time as opposed to hard codes half a second. Still accepts boolean values


31 changes: 31 additions & 0 deletions LibEventHandler.addon
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
## Title: LibEventHandler
## Version: 1.3.13
## Author: Justinon
## IsLibrary: true
## APIVersion: 101049 101050
## AddOnVersion: 1313
## OptionalDependsOn: LibDebugLogger>=307

LibEventHandler.lua

; DISCLOSURE:
; This Add-on is not created by, affiliated with or sponsored by ZeniMax
; Media Inc. or its affiliates. The Elder Scrolls® and related logos are
; registered trademarks or trademarks of ZeniMax Media Inc. in the United
; States and/or other countries. All rights reserved.
; You can read the full terms at https://account.elderscrollsonline.com/add-on-terms

; AUTHOR NOTE:
; Thank you for downloading LibEventHandler!
;
; The main purpose of this library is to allow for a more versatile event handler than what ZOS provides
; through their EVENT_MANAGER. LibEventHandler expands the limitation of an event being incarcerated with
; only one function, to now being able to be linked to as many different functions as needed. In addition,
; it allows for the firing and registering of local events that you create within your addon. Together,
; these features enable this powerful tool to allow the developer to not only be more flexible with event
; managing, but also to be more clean, concise, and acyclical with code.
;
; Zenimax's EVENT_MANAGER will still need to be used should you require registering any functions for update,
; simply because I found theirs to be sufficient and did not need any more versatility.
;
; Again, thanks a bunch! Have fun programming! :)
21 changes: 12 additions & 9 deletions LibEventHandler.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
local MAJOR, MINOR = "LibEventHandler-1.2", 1.1
local LEH, LEHminor = LibStub:NewLibrary(MAJOR, MINOR)
if not LEH then return end

if LibEventHandler then d("Warning : 'LibEventHandler' has always been loaded.") return end
local LEH = {}
if LibDebugLogger then LEH.LDL = LibDebugLogger("LibEventHandler") end
local LDL = LEH.LDL

LEH.eventToFunctionTable = {}
local eventToFunctionTable = LEH.eventToFunctionTable
Expand All @@ -27,7 +27,7 @@ function LEH:FireEvent(eventCode, async, ...)
return
elseif type(async) == number then
if async < 0 then
d("Can't delay by a negative time!")
if LDL then LDL:Warn("Can't delay by a negative time!") end
return
end
zo_callLater(function() CallEventFunctions(eventCode, unpack(arg)) end, async)
Expand Down Expand Up @@ -55,10 +55,10 @@ function LEH:UnregisterForLocalEvent(eventCode, functionName)
return false
end
end
if not didUnregister then d("Function trying to be removed isn't registered with event "..eventCode) end
if not didUnregister then if LDL then LDL:Warn("Function trying to be removed isn't registered with event", eventCode) end end
return false
else
d("No function registered yet for "..eventCode)
if LDL then LDL:Warn("No function registered yet for", eventCode) end
return false
end
end
Expand All @@ -81,7 +81,7 @@ function LEH:RegisterForLocalEvent(eventCode, functionName)
local numOfFuncs = #eventToFunctionTable[eventCode]
for i = 1, numOfFuncs, 1 do
if eventToFunctionTable[eventCode][i] == functionName then
d("Function already registered for event "..eventCode)
if LDL then LDL:Warn("Function already registered for event ", eventCode) end
return false
end
end
Expand All @@ -99,4 +99,7 @@ function LEH:RegisterForEvent(namespace, eventCode, functionName)
if needsRegistration then
EVENT_MANAGER:RegisterForEvent(namespace, eventCode, CallEventFunctions)
end
end
end


LibEventHandler = LEH -- global variable for accessing library API.
2 changes: 1 addition & 1 deletion README.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Author: Justin Glommen (Justinon)
Version: 1.2
Version: 1.3

Thank you for downloading LibEventHandler!

Expand Down