Skip to content

Commit b3d9ebe

Browse files
committed
Merge branch 'main' into classic-beta
2 parents 1134386 + ea73e68 commit b3d9ebe

File tree

4 files changed

+132
-64
lines changed

4 files changed

+132
-64
lines changed

ElvUI/Core/Modules/Chat/Chat.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,8 +309,8 @@ do --this can save some main file locals
309309
local MelColors = function(t) return specialText(t, 0.98,0.31,0.43, 0.97,0.78,0.13, 0.31,0.76,0.43, 0.49,0.48,0.97, 0.07,0.69,0.92) end
310310
--Thradex: summer without you
311311
local ThradexColors = function(t) return specialText(t, 0.00,0.60,0.09, 0.22,0.65,0.90, 0.22,0.65,0.90, 1.00,0.74,0.27, 1.00,0.66,0.00, 1.00,0.50,0.20, 0.92,0.31,0.23) end
312-
--Repooc: Monk, Demon Hunter, Paladin, Warlock colors
313-
local PoocsColors = function(t) return specialText(t, 0,1,0.6, 0.64,0.19,0.79, 0.96,0.55,0.73, 0.53,0.53,0.93) end
312+
--Repooc: Something to change it up a little
313+
local PoocsColors = function(t) return specialText(t, 0.9,0.8,0.5) end
314314

315315
itsSimpy = function() return ElvSimpy, SimpyColors end
316316
itsElv = function() return ElvBlue, ElvColors end

ElvUI/Core/Modules/Misc/Misc.lua

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ local SendChatMessage = SendChatMessage
3838
local StaticPopup_Hide = StaticPopup_Hide
3939
local StaticPopupSpecial_Hide = StaticPopupSpecial_Hide
4040
local UninviteUnit = UninviteUnit
41-
local UnitExists = UnitExists
4241
local UnitGUID = UnitGUID
4342
local UnitInRaid = UnitInRaid
4443
local UnitName = UnitName
4544
local IsInGuild = IsInGuild
4645
local PlaySound = PlaySound
4746
local GetNumFactions = GetNumFactions
4847
local GetFactionInfo = GetFactionInfo
48+
local UnitIsGroupLeader = UnitIsGroupLeader
4949
local GetWatchedFactionInfo = GetWatchedFactionInfo
5050
local ExpandAllFactionHeaders = ExpandAllFactionHeaders
5151
local SetWatchedFactionIndex = SetWatchedFactionIndex
@@ -58,6 +58,7 @@ local IsFriend = C_FriendList.IsFriend
5858

5959
local LE_GAME_ERR_GUILD_NOT_ENOUGH_MONEY = LE_GAME_ERR_GUILD_NOT_ENOUGH_MONEY
6060
local LE_GAME_ERR_NOT_ENOUGH_MONEY = LE_GAME_ERR_NOT_ENOUGH_MONEY
61+
local LE_PARTY_CATEGORY_HOME = LE_PARTY_CATEGORY_HOME
6162
local MAX_PARTY_MEMBERS = MAX_PARTY_MEMBERS
6263
local UNKNOWN = UNKNOWN
6364

@@ -218,17 +219,24 @@ end
218219
function M:DisbandRaidGroup()
219220
if InCombatLockdown() then return end -- Prevent user error in combat
220221

221-
if UnitInRaid('player') then
222-
for i = 1, GetNumGroupMembers() do
223-
local name, _, _, _, _, _, _, online = GetRaidRosterInfo(i)
224-
if online and name ~= E.myname then
225-
UninviteUnit(name)
222+
local myIndex = UnitInRaid('player')
223+
if myIndex then
224+
local _, myRank = GetRaidRosterInfo(myIndex)
225+
if myRank == 2 then -- real raid leader
226+
for i = 1, GetNumGroupMembers() do
227+
if i ~= myIndex then -- dont kick yourself
228+
local name = GetRaidRosterInfo(i)
229+
if name then
230+
UninviteUnit(name)
231+
end
232+
end
226233
end
227234
end
228-
else
235+
elseif not myIndex and UnitIsGroupLeader('player', LE_PARTY_CATEGORY_HOME) then
229236
for i = MAX_PARTY_MEMBERS, 1, -1 do
230-
if UnitExists('party'..i) then
231-
UninviteUnit(UnitName('party'..i))
237+
local name = UnitName('party'..i)
238+
if name then
239+
UninviteUnit(name)
232240
end
233241
end
234242
end

0 commit comments

Comments
 (0)