Skip to content

Commit

Permalink
Range status: Now range of charmed/controlled units should work.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelnpsp committed Apr 14, 2024
1 parent eff32af commit aa003ce
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions modules/StatusRange.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ local tostring = tostring
local IsInInstance = IsInInstance
local UnitIsUnit = UnitIsUnit
local UnitInRange = UnitInRange
local UnitIsFriend = UnitIsFriend
local UnitCanAttack = UnitCanAttack
local UnitCanAssist = UnitCanAssist
local IsSpellInRange = IsSpellInRange
Expand Down Expand Up @@ -180,19 +179,17 @@ local Ranges = {
return
elseif UnitIsUnit(unit,'player') then
return true
elseif UnitIsFriend("player", unit) then
if worldRange40 and grouped_units[unit] then
return UnitInRange(unit)
else
return IsSpellInRange(UnitIsDeadOrGhost(unit) and rezSpell or rangeSpell,unit)==1
end
else
elseif UnitCanAttack('player', unit) then
return CheckHostileDistance(unit,4) -- 28y for enemies
elseif worldRange40 and grouped_units[unit] then
return UnitInRange(unit)
else
return IsSpellInRange(UnitIsDeadOrGhost(unit) and rezSpell or rangeSpell,unit)==1
end
end,
["spell"] = function(unit)
if not UnitPhaseReason(unit) then
if UnitIsFriend("player", unit) then
if not UnitCanAttack('player', unit) then
if UnitIsUnit(unit,'player') then
return true
elseif worldRange40 and grouped_units[unit] then
Expand Down

0 comments on commit aa003ce

Please sign in to comment.