Update range check API to for TWW

This commit is contained in:
2024-11-25 22:30:01 +01:00
parent b1dca1639d
commit ec7e2c74ff

View File

@@ -201,9 +201,9 @@ function UnitFrame:IsInRange()
-- Prefer to use configured spells -- Prefer to use configured spells
if friendlySpell and UnitCanAssist("player", unit) then if friendlySpell and UnitCanAssist("player", unit) then
return IsSpellInRange(friendlySpell, unit) == 1 return C_Spell.IsSpellInRange(friendlySpell, unit) == true
elseif enemySpell and UnitCanAttack("player", unit) then elseif enemySpell and UnitCanAttack("player", unit) then
return IsSpellInRange(enemySpell, unit) == 1 return C_Spell.IsSpellInRange(enemySpell, unit) == true
end end
-- Fall back to raid/party only range check -- Fall back to raid/party only range check