Skip to content

Commit

Permalink
Added a disband option to the raid roster
Browse files Browse the repository at this point in the history
  • Loading branch information
papa-smurf committed Jan 15, 2024
1 parent 30c73e7 commit 7d2efad
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Classes/RaidGroups.lua
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,28 @@ function RaidGroups:drawImporter()
FooterFrame:AddChild(KickUnwantedButton);
GL.Interface:addTooltip(KickUnwantedButton.frame, "Kick players that aren't on the roster");

local DisbandButton = AceGUI:Create("Button");
DisbandButton:SetText("Disband raid");
DisbandButton:SetWidth(126);
DisbandButton:SetCallback("OnClick", function()
-- Show a confirmation dialog before disbanding the raid
GL.Interface.Dialogs.PopupDialog:open{
question = "Are you sure?",
OnYes = function ()
GL:forEachGroupMember(function (Member)
if (GL:iEquals(string.lower(Member.name), GL.User.name)) then
return;
end

-- Kick the player!
UninviteUnit(GL:iEquals(Member.realm, GL.User.realm) and Member.name or Member.fqn);
end);
end
};
end);
FooterFrame:AddChild(DisbandButton);
GL.Interface:addTooltip(DisbandButton.frame, "Disband your raid");

self.UIComponents.TankAssignmentButton = SetTanksButton;
end

Expand Down

0 comments on commit 7d2efad

Please sign in to comment.