Various cleanup

Removes version compatibility checks for TBC/Vanilla, consolidating code to target a single WoW version. Refactors repetitive SetWidth/SetHeight calls to SetSize for cleaner code. Removes duplicate function definitions from unitxp module and simplifies conditional show/hide operations using SetShown.
This commit is contained in:
Brues
2026-07-25 10:10:12 -05:00
parent 11a6302c2d
commit c0da63657d
12 changed files with 33 additions and 101 deletions
-20
View File
@@ -331,26 +331,6 @@ pfUI:RegisterModule("unitxp", function ()
return success and found
end
pfUI.api.UnitInLineOfSight = function(unit1, unit2)
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
pfUI.api.UnitIsBehind = function(unit1, unit2)
if not unit2 then
unit2 = unit1
unit1 = "player"
end
local success, behind = pcall(UnitXP, "behind", unit1, unit2)
if success then return behind end
return nil
end
-- Debug command to test UnitXP indicators
pfUI.api.RegisterSlashCommand("PFUNITXP", { "/pfunitxp" }, function()
local chat = DEFAULT_CHAT_FRAME