Implement follow command

This commit is contained in:
2025-01-06 00:25:03 +01:00
parent 60ccbc72bb
commit 8524a1116a

View File

@@ -165,6 +165,12 @@ function shared.Commander.Init()
LeaveParty()
return {}
end
---@param target string
local function FollowTarget(target)
if not target then return end
FollowUnit(target)
return {}
end
---@class Command
---@field keywordRe string
@@ -179,6 +185,7 @@ function shared.Commander.Init()
{ keywordRe = "^helpen", commanderOnly = false, callback = HelpEn },
{ keywordRe = "^joingroup", commanderOnly = true, callback = JoinGroup },
{ keywordRe = "^leavegroup", commanderOnly = true, callback = LeaveGroup },
{ keywordRe = "^follow", commanderOnly = false, callback = FollowTarget },
}
local commanderChannelFrame = CreateFrame("Frame")