This repository has been archived by the owner on Jun 1, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
478 additions
and
483 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
-- luna clickcasting support | ||
-- note: clique support is not possible afaik | ||
Focus_Loader:Register("LunaUnitFrames", function(Focus) | ||
local orig_lufmo = SlashCmdList.LUFMO | ||
local L = LunaUF and LunaUF.L | ||
if not L or not LunaUF.Mouseover then return end | ||
|
||
SlashCmdList.LUFMO = function(msg, editbox) | ||
local frame = GetMouseFocus() | ||
|
||
if msg and strfind(frame:GetName() or "", "FocusFrame") then | ||
Focus:CastSpellByName(msg) | ||
else | ||
orig_lufmo(msg, editbox) | ||
end | ||
end | ||
|
||
FocusFrame_OnClick = function(btn) | ||
if btn == "UNKNOWN" then | ||
btn = LunaUF.clickedButton | ||
end | ||
|
||
--[[if Luna_Custom_ClickFunction and Luna_Custom_ClickFunction(btn, "target") then | ||
return | ||
end]] | ||
|
||
local button = (IsControlKeyDown() and "Ctrl-" or "") .. (IsShiftKeyDown() and "Shift-" or "") .. (IsAltKeyDown() and "Alt-" or "") .. L[btn] | ||
local action = LunaUF.db.profile.clickcasting.bindings[button] | ||
|
||
if not action then | ||
return | ||
elseif action == L["menu"] then | ||
if SpellIsTargeting() then | ||
return SpellStopTargeting() | ||
end | ||
elseif action == L["target"] then | ||
if SpellIsTargeting() then | ||
Focus:Call(SpellTargetUnit) | ||
elseif CursorHasItem() then | ||
Focus:Call(DropItemOnUnit) | ||
else | ||
Focus:TargetFocus() | ||
end | ||
else | ||
Focus:TargetFocus() | ||
LunaUF:Mouseover(action) | ||
Focus:TargetPrevious() | ||
end | ||
end | ||
end) | ||
|
||
--[[Loader:Register("pfUI", function(Focus) | ||
local orig_pfcast = SlashCmdList.PFCAST | ||
SlashCmdList.PFCAST = function(arg1, arg2) | ||
local frame = GetMouseFocus() | ||
if arg1 and strfind(frame:GetName() or "", "FocusFrame") then | ||
Focus:Call(CastSpellByName, arg1) | ||
else | ||
orig_PFCAST(arg1, arg2) | ||
end | ||
end | ||
end)]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.