Skip to content

Commit

Permalink
RangeFader: Fix IsSpellInRange checks
Browse files Browse the repository at this point in the history
Fixes #68
  • Loading branch information
nebularg committed Jul 24, 2024
1 parent 33194b9 commit 4c324f0
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Modules/RangeFader/RangeFader.lua
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ end
local function friendly_is_in_range(unit)
if UnitIsDeadOrGhost(unit) then
for _, name in ipairs(res_spells) do
if IsSpellInRange(name, unit) == 1 then
if IsSpellInRange(name, unit) then
return true
end
end
Expand All @@ -162,7 +162,7 @@ local function friendly_is_in_range(unit)
end

for _, name in ipairs(friendly_spells) do
if IsSpellInRange(name, unit) == 1 then
if IsSpellInRange(name, unit) then
return true
end
end
Expand All @@ -172,12 +172,12 @@ end

local function pet_is_in_range(unit)
for _, name in ipairs(friendly_spells) do
if IsSpellInRange(name, unit) == 1 then
if IsSpellInRange(name, unit) then
return true
end
end
for _, name in ipairs(pet_spells) do
if IsSpellInRange(name, unit) == 1 then
if IsSpellInRange(name, unit) then
return true
end
end
Expand All @@ -191,7 +191,7 @@ local function enemy_is_in_range(unit)
end

for _, name in ipairs(enemy_spells) do
if IsSpellInRange(name, unit) == 1 then
if IsSpellInRange(name, unit) then
return true
end
end
Expand All @@ -201,7 +201,7 @@ end

local function enemy_is_in_long_range(unit)
for _, name in ipairs(long_enemy_spells) do
if IsSpellInRange(name, unit) == 1 then
if IsSpellInRange(name, unit) then
return true
end
end
Expand All @@ -219,7 +219,7 @@ function PitBull4_RangeFader:GetOpacity(frame)
end

if check_method == "custom_spell" and db.custom_spell then
if IsSpellInRange(db.custom_spell, unit) == 1 then
if IsSpellInRange(db.custom_spell, unit) then
return 1
else
return db.out_of_range_opacity
Expand Down

0 comments on commit 4c324f0

Please sign in to comment.