Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function checkTarget(ud)
- local unit = ud.unit
- if not unit then return nil end
- local success, result = pcall(function()
- if not UnitExists(unit) or UnitIsUnit(unit, "player") then
- return nil
- end
- if UnitIsDeadOrGhost(unit) then
- ud.useSound = false
- return not ud.db.enemyOnly
- end
- if UnitCanAttack("player", unit) then
- ud.useSound = not mute
- return true
- elseif UnitCanAssist("player", unit) then
- ud.useSound = not mute and not ud.db.warnEnemyOnly
- return not ud.db.enemyOnly
- end
- ud.useSound = false
- return not ud.db.enemyOnly
- end)
- if success then
- return result
- else
- return true
- end
- end
Advertisement
Comments
-
- Also make sure in your `RangeDisplay.toc` file on the #Interface line the 120001,120000 versions are included too.
Add Comment
Please, Sign In to add comment