macrotweak: migrate to new slash command api

This commit is contained in:
shagu
2020-11-16 15:23:06 +01:00
parent ec594df203
commit 33aac6cae2
+2 -3
View File
@@ -19,12 +19,11 @@ pfUI:RegisterModule("macrotweak", "vanilla", function ()
end
-- add /use and /equip to the macro api
_G.SLASH_PFUSE1, _G.SLASH_PFUSE2, _G.SLASH_PFUSE3, _G.SLASH_PFUSE4 = '/use', '/pfuse', '/equip', '/pfequip'
function _G.SlashCmdList.PFUSE(msg)
pfUI.api.RegisterSlashCommand("PFUSE", { "/equip" , "/use", "/pfequip", "/pfuse" }, function (msg)
if not msg or msg == "" then return end
local bag, slot = FindItem(msg)
if bag and slot then
UseContainerItem(bag, slot)
end
end
end)
end)