View Single Post
04-01-21, 11:53 PM   #4
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,326
Here's an example 0f what I was talking about; redirecting the function to a dummy function.
I added a couple other functions to redirect and a 4th to hook and reset the color.
Lua Code:
  1. --  Define a dummy function that literally does nothing
  2. local function DoNothing() end
  3.  
  4. --  Disable fade pulsing at <20% health
  5. TargetFrame_HealthUpdate=DoNothing;
  6.  
  7. --  Disable health-based portrait tinting
  8. TargetHealthCheck=DoNothing;
  9. TargetofTargetHealthCheck=DoNothing;
  10.  
  11. --  This one's trickier since we want faction textures to work
  12. --  Disable mob tap portrait fade
  13. hooksecurefunc("TargetFrame_CheckFaction",function(self)--  Secure-hook this function to run our own code after
  14. --  Note: This function runs from a template and portraits are optional
  15.     if self.portrait then self.portrait:SetVertexColor(1,1,1); end--    If portrait exists, set RGB filter to 100% on all channels
  16. end);
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote