Jump to content
Toggle menu
  • 17.3K articles
  • 8.2K files
  • 5 users
  • 280.7K edits
WoW Classic Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

This article is a part of the documentation of the Sea function library

--
-- hook( string originalFunctionName, string newFunction, string hooktype )
--
-- 	Hooks a function.
--
-- 	Example: 
-- 	  hook("some_blizzard_function","my_function","before|after|hide|replace");
-- 	
-- 	Calls "my_function" before/after "some_blizzard_function".
-- 	If type is "hide", calls "my_function" before all
--     others, and only continues if it returns true.
-- 	If type is "replace", calls "my_function" instead of the
--     original function, but will also call the original function
--     afterwards if it returns  true.
--	You can also return a list of values to be returned,
--     but only if you don't return true as the first return.
--     Ex. return false, { val1, val2 };
-- 	This method is used so the hook can be later undone without
--     screwing up someone else's later hook.
--


Originally coded by Thott, Updated by Mugendai