Skip to content

Commit

Permalink
try to use follow interact for friendly
Browse files Browse the repository at this point in the history
  • Loading branch information
kodewdle committed Jan 29, 2025
1 parent 0c71b34 commit 2be4cce
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ElvUI/Core/Modules/UnitFrames/Elements/Range.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ local UnitCanAttack = UnitCanAttack
local UnitIsConnected = UnitIsConnected
local UnitIsDeadOrGhost = UnitIsDeadOrGhost
local IsSpellKnownOrOverridesKnown = IsSpellKnownOrOverridesKnown
local CheckInteractDistance = CheckInteractDistance
local InCombatLockdown = InCombatLockdown

local IsSpellInRange = C_Spell.IsSpellInRange
local UnitPhaseReason = UnitPhaseReason
Expand Down Expand Up @@ -77,6 +79,10 @@ function UF:UnitInSpellsRange(unit, which)
return range
end

if which == 2 then -- friendly check follow interact when not in combat
return not InCombatLockdown() and CheckInteractDistance(unit, 4)
end

return 1 -- no spells checked
end

Expand Down

0 comments on commit 2be4cce

Please sign in to comment.