mirror of
https://github.com/brues-code/pfUI.git
synced 2026-11-01 16:36:56 +00:00
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:
-14
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user