Next version of LibFail updated for Cataclysm. It is still a library that detects failures at certain raid tasks.
In LibFail-2.0 fail detection is completely rewritten which should allow fail events to be added more easier. There are also some new API calls that might come in handy when building your front-end.
You can find a list of supported fails: here
This is an open repository. Feel free to add to it, and make fixes yourself.
API: http://www.wowace.com/projects/libfail-2-0/pages/api/lib-fail-2-0/
Make sure that LibFail-2.0 dependencies are loaded before loading LibFail-2.0
Sample Code
local fail = LibStub("LibFail-2.0")
local failEvents = fail:GetSupportedEvents()
local LF = LibStub("AceLocale-3.0"):GetLocale("LibFail-2.0")
-- ... extra arguments such as spell used to trigger a barrier on Omnotron
local function onFail(failName, playerName, failType, ...)
-- Get a localized string to be used as a name for the fail event
local eventName = fail:GetEventName(failName) or ""
-- Use either your own or one of the commonly used strings to print out the fail
local faimsg = LF["%s fails at %s (%s)"]
print( failmsg:format(playerName, failType, eventName) )
end
for _, event in ipairs(failEvents) do
fail.RegisterCallback("SampleAddon", event, onFail)
end