oUF SpellRange

About oUF_SpellRange

A simple example of oUF SpellRange fading an oUF layout.
An out-of-range neutral mob just beyond an in-range friendly one.


oUF SpellRange is an element plug-in for Haste's oUF unit frame framework that fades unit frames when out of casting range.  Unlike the default oUF range fading, SpellRange works for any hostile or friendly targets, rather than group members only.  You must have oUF and a compatible layout for oUF SpellRange to do anything.


The settings for implementing SpellRange are intentionally the same as the default Range element, because the two elements cannot work together. SpellRange will disable the Range element for frames where both are enabled.

To enable the SpellRange element:

self.SpellRange = {
-- At least one set of required properties, listed below

Either of the following sets of properties is required:

  • --- Takes priority over .insideRange/.outsideRange, and fires when changing between them.
    function self.SpellRange.Update( self, InRange )

  • self.SpellRange.insideAlpha = 1.0; -- Frame alpha when in range
    self.SpellRange.outsideAlpha = 0.4; -- Frame alpha when out of range

Don't forget to add oUF_SpellRange as an optional dependency of your layout.

Note: SpellRange is necessarily slower than the default Range element, so use it with caution for large groups like raids or parties. The default Range element will always work for "player", "pet", and any unit that passes UnitPlayerOrPetInParty/UnitPlayerOrPetInRaid, however it is limited to 38 yard range.

Click here to lend your support to: WoW Addon - oUF SpellRange and make a donation at www.pledgie.com !
Subpages (1): Change Log