Compare commits
2 Commits
Author | SHA1 | Date |
---|---|---|
Robin Hüskes | 282cefd4fe | |
Robin Hüskes | 9aae2e9d4c |
|
@ -2,5 +2,12 @@
|
|||
## Title: BrokerPack
|
||||
## OptionalDeps: zzLib, Ace3
|
||||
## SavedVariables: BrokerPackDB
|
||||
## X-Repository: https://git.grml.de/rilgamon/BrokerPack.git
|
||||
## X-WoWI-ID: 18953
|
||||
## X-Curse-Project-ID: 28006
|
||||
## Title: BrokerPack
|
||||
## Notes: Collection of available zz brokers
|
||||
## Notes-deDE: Sammlung der verfügbaren zz Broker
|
||||
## Author: Rilgamon
|
||||
Libs\embeds.xml
|
||||
pack.xml
|
|
@ -1,5 +1,5 @@
|
|||
--[[ $Id: CallbackHandler-1.0.lua 1284 2022-09-25 09:15:30Z nevcairiel $ ]]
|
||||
local MAJOR, MINOR = "CallbackHandler-1.0", 7
|
||||
--[[ $Id: CallbackHandler-1.0.lua 26 2022-12-12 15:09:39Z nevcairiel $ ]]
|
||||
local MAJOR, MINOR = "CallbackHandler-1.0", 8
|
||||
local CallbackHandler = LibStub:NewLibrary(MAJOR, MINOR)
|
||||
|
||||
if not CallbackHandler then return end -- No upgrade needed
|
||||
|
@ -7,21 +7,16 @@ if not CallbackHandler then return end -- No upgrade needed
|
|||
local meta = {__index = function(tbl, key) tbl[key] = {} return tbl[key] end}
|
||||
|
||||
-- Lua APIs
|
||||
local error = error
|
||||
local securecallfunction, error = securecallfunction, error
|
||||
local setmetatable, rawget = setmetatable, rawget
|
||||
local next, select, pairs, type, tostring = next, select, pairs, type, tostring
|
||||
|
||||
local xpcall = xpcall
|
||||
|
||||
local function errorhandler(err)
|
||||
return geterrorhandler()(err)
|
||||
end
|
||||
|
||||
local function Dispatch(handlers, ...)
|
||||
local index, method = next(handlers)
|
||||
if not method then return end
|
||||
repeat
|
||||
xpcall(method, errorhandler, ...)
|
||||
securecallfunction(method, ...)
|
||||
index, method = next(handlers, index)
|
||||
until not method
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue