Fandom

WoWWiki

USERAPI UnregisterEventFromAllFrames

104,635pages on
this wiki
Add New Page
Talk2 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

This page documents a user-defined function that you can copy and paste into your addon. Replace <PREFIX> with your AddOn's prefix to avoid conflicts between different versions of these functions.
User defined functions < UnregisterEventFromAllFrames

Globally unregister event.

Code Edit

local function UnregisterEventFromAllFrames_helper(event, ...)
	for i=1,select('#', ...) do
		select(i, ...):UnregisterEvent(event)
	end
end

local function UnregisterEventFromAllFrames(event)
	UnregisterEventFromAllFrames_helper(event, GetFramesRegisteredForEvent(event))
end

Example Edit

-- Globally unregister the event 'MERCHANT_SHOW'.
UnregisterEventFromAllFrames('MERCHANT_SHOW')

Also on Fandom

Random Wiki