mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-30 19:19:59 +00:00
unitframes: add option to enable global clickcast
This commit is contained in:
@@ -25,6 +25,45 @@ pfUI:RegisterModule("player", function ()
|
||||
end
|
||||
else
|
||||
TargetUnit("player")
|
||||
|
||||
if pfUI_config.unitframes.globalclick == "0" then return end
|
||||
|
||||
-- clickcast: shift modifier
|
||||
if IsShiftKeyDown() then
|
||||
if pfUI_config.unitframes.raid.clickcast_shift ~= "" then
|
||||
CastSpellByName(pfUI_config.unitframes.raid.clickcast_shift)
|
||||
pfUI.uf.target.noanim = "yes"
|
||||
TargetLastTarget()
|
||||
return
|
||||
end
|
||||
-- clickcast: alt modifier
|
||||
elseif IsAltKeyDown() then
|
||||
if pfUI_config.unitframes.raid.clickcast_alt ~= "" then
|
||||
CastSpellByName(pfUI_config.unitframes.raid.clickcast_alt)
|
||||
pfUI.uf.target.noanim = "yes"
|
||||
TargetLastTarget()
|
||||
return
|
||||
end
|
||||
-- clickcast: ctrl modifier
|
||||
elseif IsControlKeyDown() then
|
||||
if pfUI_config.unitframes.raid.clickcast_ctrl ~= "" then
|
||||
CastSpellByName(pfUI_config.unitframes.raid.clickcast_ctrl)
|
||||
pfUI.uf.target.noanim = "yes"
|
||||
TargetLastTarget()
|
||||
return
|
||||
end
|
||||
-- clickcast: default
|
||||
else
|
||||
if pfUI_config.unitframes.raid.clickcast ~= "" then
|
||||
CastSpellByName(pfUI_config.unitframes.raid.clickcast)
|
||||
pfUI.uf.target.noanim = "yes"
|
||||
TargetLastTarget()
|
||||
return
|
||||
else
|
||||
-- no clickcast: default action
|
||||
TargetUnit("player")
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user