Hinos

Range Display - 12.0.0 fix

Feb 7th, 2026
106
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.71 KB | Source Code | 0 0
  1. local function checkTarget(ud)
  2.   local unit = ud.unit
  3.   if not unit then return nil end
  4.  
  5.   local success, result = pcall(function()
  6.     if not UnitExists(unit) or UnitIsUnit(unit, "player") then
  7.       return nil
  8.     end
  9.  
  10.     if UnitIsDeadOrGhost(unit) then
  11.       ud.useSound = false
  12.       return not ud.db.enemyOnly
  13.     end
  14.  
  15.     if UnitCanAttack("player", unit) then
  16.       ud.useSound = not mute
  17.       return true
  18.     elseif UnitCanAssist("player", unit) then
  19.       ud.useSound = not mute and not ud.db.warnEnemyOnly
  20.       return not ud.db.enemyOnly
  21.     end
  22.    
  23.     ud.useSound = false
  24.     return not ud.db.enemyOnly
  25.   end)
  26.  
  27.   if success then
  28.     return result
  29.   else
  30.     return true
  31.   end
  32. end
Advertisement
Comments
  • Hinos
    278 days
    # text 0.11 KB | 0 0
    1. 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