LibFail-2.0

This project is abandoned and its default file will likely not work with the most recent version of World of Warcraft. Whether this project is out of date or its author has marked it as abandoned, this project is no longer maintained.

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

Comments

  • To post a comment, please or register a new account.
Posts Quoted:
Reply
Clear All Quotes

About This Project

  • Project ID
    27955
  • Created
    Dec 2, 2010
  • Last Released File
    Jun 30, 2012
  • Total Downloads
    27,172
  • License

Categories

Members

Recent Files

WoW Retail