Usage
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 )
endOR self.SpellRange.insideAlpha = 1.0; -- Frame alpha when in range
self.SpellRange.outsideAlpha = 0.4; -- Frame alpha when out of rangeDon'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 ("http://www.wowwiki.com/API_UnitPlayerOrPetInParty")/UnitPlayerOrPetInRaid ("http://www.wowwiki.com/API_UnitPlayerOrPetInRaid"), however it is limited to 38 yard range.