LibFail-MoP

This project has become inactive.

This project is inactive and its default file will likely not work with the most recent version of World of Warcraft. The author may have abandoned it, or it may have outlived its usefulness.

Next version of LibFail updated for Mists of Pandaria. It is still a library that detects failures at certain raid tasks.

In LibFail-MoP fail detection is very similar to how it was in LibFail-2.0. API calls are mostly the same as well with few improovements.

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-mop/pages/api/lib-fail-mop/

Make sure that LibFail-MoP dependencies are loaded before loading LibFail-MoP

Sample Code

local fail = LibStub("LibFail-MoP")
local failEvents = fail:GetSupportedEvents()
local LF = LibStub("AceLocale-3.0"):GetLocale("LibFail-MoP")

-- ... 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 failmsg = 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

You must login to post a comment. Don't have an account? Register to get one!

Facts

Date created
Aug 21, 2012
Category
Last update
Oct 15, 2014
Development stage
Inactive
Language
  • deDE
  • enUS
  • esES
  • frFR
  • itIT
  • koKR
  • ruRU
  • zhCN
  • zhTW
License
MIT License
Curse link
LibFail-MoP
Downloads
7,360
Recent files
  • A: r68 for 6.0.2 Oct 15, 2014
  • A: r67 for 5.4.2 Jan 03, 2014
  • A: r66 for 5.4.0 Oct 02, 2013
  • R: 1.11-RELEASE-LFr64 for 5.4.0 Sep 12, 2013
  • A: r64 for 5.4.0 Sep 12, 2013

Authors

  • Avatar of Maat
    • Manager
    • Author