Skip to content

Commit 0601910

Browse files
committed
Try to support /click LiteAssistDo 2 true
1 parent 14fb550 commit 0601910

File tree

1 file changed

+3
-29
lines changed

1 file changed

+3
-29
lines changed

LiteAssist.lua

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -50,32 +50,6 @@ function LiteAssist_SetDebug(val)
5050
end
5151

5252

53-
-- ----------------------------------------------------------------------------
54-
-- Version settings upgrade functions
55-
--
56-
57-
local function UpgradeBindingNames()
58-
59-
local BindingMap = {
60-
["CLICK LiteAssistLearnTarget"] = "CLICK LiteAssistLearnTarget:LeftButton",
61-
["CLICK LiteAssistLearnHover"] = "CLICK LiteAssistLearnHover:LeftButton",
62-
["CLICK LiteAssistDo"] = "CLICK LiteAssistDo:LeftButton",
63-
["LITEASSIST_LEARNTARGET"] = "CLICK LiteAssistLearnTarget:LeftButton",
64-
["LITEASSIST_LEARNHOVER"] = "CLICK LiteAssistLearnHover:LeftButton",
65-
["LITEASSIST_DO"] = "CLICK LiteAssistDo:LeftButton",
66-
}
67-
68-
for old,new in pairs(BindingMap) do
69-
for _, keystr in ipairs({ GetBindingKey(old) }) do
70-
if keystr and keystr ~= "" then
71-
SetBinding(keystr, new)
72-
end
73-
end
74-
end
75-
76-
end
77-
78-
7953
-- ----------------------------------------------------------------------------
8054
-- Event handling functions
8155
--
@@ -322,6 +296,7 @@ local function UpdateMacro()
322296
local name = CurrentName
323297

324298
LiteAssistDo:SetAttribute("macrotext", GetMacroText(name or "target"))
299+
LiteAssistDo:SetAttribute("unit", name or "target")
325300

326301
DebugMsg("Set assist to " .. (name or "target") .. " / " .. (CurrentId or "none"))
327302

@@ -405,11 +380,10 @@ function LiteAssist_OnLoad(self)
405380
DebugMsg("OnLoad handler called.")
406381
DebugMsg("A truckload of debugging output enabled.")
407382

408-
-- Config upgrades here
409-
UpgradeBindingNames()
410-
411383
-- Set up the default options for our assisting (assist target)
412384
LiteAssistDo:SetAttribute("type", "macro")
385+
LiteAssistDo:SetAttribute("type2", "assist")
386+
413387
-- https://github.com/Stanzilla/WoWUIBugs/issues/317#issuecomment-1510847497
414388
LiteAssistDo:SetAttribute("pressAndHoldAction", true)
415389

0 commit comments

Comments
 (0)