mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-24 08:36:04 +00:00
unitframes: revert target if no focus was found
This commit is contained in:
@@ -684,7 +684,15 @@ function pfUI.uf:EnableScripts()
|
||||
|
||||
f:SetScript("OnClick", function ()
|
||||
if not this.label and this.unitname then
|
||||
local player = UnitIsUnit("target", "player")
|
||||
TargetByName(this.unitname)
|
||||
if strlower(UnitName("target")) ~= strlower(this.unitname) then
|
||||
if player then
|
||||
TargetUnit("player")
|
||||
else
|
||||
TargetLastTarget()
|
||||
end
|
||||
end
|
||||
else
|
||||
pfUI.uf:ClickAction(arg1)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user