mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-21 20:00:48 +00:00
unitframes: add support for native superwow click casting
This commit is contained in:
+13
-6
@@ -2085,16 +2085,23 @@ function pfUI.uf:ClickAction(button)
|
|||||||
showmenu = nil
|
showmenu = nil
|
||||||
else
|
else
|
||||||
-- run click cast action
|
-- run click cast action
|
||||||
local tswitch = UnitIsUnit(unitstr, "target")
|
local is_macro = string.find(this.clickactions[modstring], "^%/(.+)")
|
||||||
TargetUnit(unitstr)
|
|
||||||
|
|
||||||
if string.find(this.clickactions[modstring], "^%/(.+)") then
|
if superwow_active and not is_macro then
|
||||||
RunMacroText(this.clickactions[modstring])
|
CastSpellByName(this.clickactions[modstring], unitstr)
|
||||||
else
|
else
|
||||||
CastSpellByName(this.clickactions[modstring])
|
local tswitch = UnitIsUnit(unitstr, "target")
|
||||||
|
TargetUnit(unitstr)
|
||||||
|
|
||||||
|
if is_macro then
|
||||||
|
RunMacroText(this.clickactions[modstring])
|
||||||
|
else
|
||||||
|
CastSpellByName(this.clickactions[modstring])
|
||||||
|
end
|
||||||
|
|
||||||
|
if not tswitch then TargetLastTarget() end
|
||||||
end
|
end
|
||||||
|
|
||||||
if not tswitch then TargetLastTarget() end
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user