unitframes: add option to enable global clickcast

This commit is contained in:
shagu
2016-12-12 22:45:41 +01:00
parent 1e749832d2
commit df4be70f18
6 changed files with 153 additions and 2 deletions
+39
View File
@@ -172,6 +172,45 @@ pfUI:RegisterModule("group", function ()
DropItemOnUnit("party" .. this.id)
else
TargetUnit("party" .. this.id)
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("party" .. this.id)
end
end
end
else
local x, y = GetCursorPosition()