View Single Post
10-10-08, 08:26 AM   #78
Slakah
A Molten Giant
 
Slakah's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2007
Posts: 863
Caellian this code "should" work.


Code:
local hook = self.Experience.SetScript

function self.Experience:SetScript(handle, func)
	if handle ~= "OnEnter" and handle ~= "OnLeave" then return hook(self, handle, func) end
	return hook(self, handle, function(exp, ...) 
		exp:SetAlpha(handle == "OnEnter" and 1 or 0)
		func(exp, ...)
	end)
end
This will basically hook OnEnter and OnLeave whenever oUF_Experience changes the OnEnter and OnLeave.

Last edited by Slakah : 10-10-08 at 02:03 PM.