View Single Post
05-27-18, 05:50 AM   #6
Vrul
A Scalebane Royal Guard
 
Vrul's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2007
Posts: 404
Not tested but based on that error you could try:
Code:
--[Change Raid Frame OOR Fade/Alpha Transparency]
hooksecurefunc("CompactUnitFrame_UpdateInRange", function(frame)
    local inRange, checkedRange = UnitInRange(frame.displayedUnit)
    local alpha = checkedRange and not inRange and 0.3 or 1
    frame:SetAlpha(alpha)
    if frame.background then
        frame.background:SetAlpha(alpha)
    end
end)
  Reply With Quote