mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-12 16:40:00 +00:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user