Show the target LoS indicator through ClassicAPI's UnitInLineOfSight

The indicator moves from the unitxp module to the target frame, so it no
longer needs UnitXP_SP3. Its checkbox and the shared font size move to a
Target Indicators header; unitxp_font_size becomes indicator_font_size.
The unused pfUI.api.UnitInLineOfSight wrapper, which shadowed the
ClassicAPI global inside the pfUI environment, is removed.
This commit is contained in:
Brues
2026-10-31 15:41:15 -05:00
parent 217b00e9a4
commit 3b64bfa98b
5 changed files with 34 additions and 65 deletions
-14
View File
@@ -59,20 +59,6 @@ function pfUI.api.GetUnitDistance(unit1, unit2)
return nil
end
-- [ UnitInLineOfSight ]
-- Returns true if unit1 has line of sight to unit2
-- Requires UnitXP_SP3
function pfUI.api.UnitInLineOfSight(unit1, unit2)
if not pfUI.api.HasUnitXP() then return nil end
if not unit2 then
unit2 = unit1
unit1 = "player"
end
local success, inSight = pcall(UnitXP, "inSight", unit1, unit2)
if success then return inSight end
return nil
end
-- [ UnitIsBehind ]
-- Returns true if unit1 is behind unit2
-- Requires UnitXP_SP3
+4 -2
View File
@@ -286,9 +286,11 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("unitframes", nil, "reactive_size", "28")
pfUI:UpdateConfig("unitframes", nil, "damage_tracking", "0")
-- UnitXP Settings
pfUI:UpdateConfig("unitframes", nil, "unitxp_font_size", "13")
-- Target Indicators
pfUI:UpdateConfig("unitframes", nil, "indicator_font_size", "13")
pfUI:UpdateConfig("unitframes", nil, "los_indicator", "0")
-- UnitXP Settings
pfUI:UpdateConfig("unitframes", nil, "behind_indicator", "0")
pfUI:UpdateConfig("unitframes", nil, "hide_distance_yd", "0")
pfUI:UpdateConfig("unitframes", nil, "unitxp_notify", "0")