mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-03 04:00:02 +00:00
mouseover: introducing mouseover casts
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
pfUI:RegisterModule("mouseover", function ()
|
||||
pfUI.uf.mouseover = CreateFrame("Frame", "pfMouseOver", UIParent)
|
||||
|
||||
SLASH_PFCAST1, SLASH_LPFCAST2 = "/pfcast", "/pfmouse"
|
||||
function SlashCmdList.PFCAST(msg, editbox)
|
||||
local oldt = true
|
||||
local unit = "mouseover"
|
||||
if not UnitExists(unit) then
|
||||
local frame = GetMouseFocus()
|
||||
if frame.label and frame.id then
|
||||
unit = frame.label .. frame.id
|
||||
else
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
if UnitIsUnit("target", unit) then oldt = nil end
|
||||
|
||||
TargetUnit(unit)
|
||||
CastSpellByName(msg)
|
||||
|
||||
if oldt then TargetLastTarget() end
|
||||
end
|
||||
end)
|
||||
Reference in New Issue
Block a user