mouseover: detect self cast to avoid target switch

If a self cast is detected, the SpellTargetUnit() function will
be used to avoid a target change. Auto-attacks now continue on
self casts because the target has no longer to be changed.
This commit is contained in:
shagu
2023-02-05 14:05:38 +01:00
parent 0f8ad4c75f
commit 961b186491
+8 -3
View File
@@ -19,9 +19,14 @@ pfUI:RegisterModule("mouseover", "vanilla", function ()
end
end
if UnitIsUnit("target", unit) then oldt = nil end
TargetUnit(unit)
if UnitIsUnit("target", unit) then
oldt = nil
elseif not func and UnitIsUnit("player", unit) then
SpellTargetUnit("player")
oldt = nil
else
TargetUnit(unit)
end
if func then
func()