Module br.player.units
This function helps in retrieving the "best" unit for the specified range and AOE/Facing.
Units functions are stored in br.player.units and can be utilized by `local units = br.player.units` in your profile.
Functions
| units.get (range) | Gets the "best" unit within a specified range in front or around the player. |
| units.customTargetWeight (unit) | Custom target weight function that profiles can override to add coefficient bonuses for dynamic targeting. |
Functions
- units.get (range)
-
Gets the "best" unit within a specified range in front or around the player.
Call once per profile rotation and use the variable it creates in br.player.units
IE: units.get(5,false) makes units.dyn5, units.get(8,true) makes units.dyn8AOE
Parameters:
- range number - Distance in yards to look for the "best" unit
- units.customTargetWeight (unit)
-
Custom target weight function that profiles can override to add coefficient bonuses for dynamic targeting.
This allows profiles to customize target prioritization beyond the default coefficient system.
Return a number to add to the unit's coefficient (higher = more priority).
Parameters:
- unit - The unit to calculate custom weight for
Usage:
-- Example: Feral druid prioritizing Rip refresh units.customTargetWeight = function(thisUnit) if debuff.rip.exists(thisUnit) and debuff.rip.remains(thisUnit) < 5 then return 80 -- High priority to refresh expiring Rip end return 0 end