azerothcore/mod-eluna

Expose core functions

Closed this issue · 1 comments

  • Group:MakeAssistant($playerguid, $true/false)
  • get/set player settings

Group:MakeAssistant($playerguid, $true/false)

See #102

Example:

local PLAYER_EVENT_ON_COMMAND = 42
local MEMBER_FLAG_ASSISTANT = 1

RegisterPlayerEvent(PLAYER_EVENT_ON_COMMAND, function(event, player, command, chathandler)
	if command == "setassist" then
		local target = player:GetSelection()
		local group = player:GetGroup()
		group:SetMemberFlag(target:GetGUID(), true, MEMBER_FLAG_ASSISTANT)
	end

	return false
end)

Invite a player to a raid group, target them and type .setassist