Skip to content

Commit

Permalink
don't load raid roster when in BG
Browse files Browse the repository at this point in the history
  • Loading branch information
Frechetta committed Jun 19, 2024
1 parent 4b95d08 commit 06351d4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion CalamityEPGP/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -453,10 +453,16 @@ end


function addon:loadRaidRoster()
if UnitInBattleground('player') then
return
end

local prevPlayers = self.raidRoster:len()

self.raidRoster:clear()

local iLeft = false

if IsInRaid() then
for i = 1, MAX_RAID_MEMBERS do
local name, _, _, _, _, classFilename, _, online, _, _, isMl, _ = GetRaidRosterInfo(i)
Expand All @@ -479,12 +485,14 @@ function addon:loadRaidRoster()
end
end
end
else
iLeft = true
end

ns.MainWindow:refresh()
ns.RaidWindow:refresh()

if ns.Lib.isOfficer() and prevPlayers ~= self.raidRoster:len() then
if ns.Lib.isOfficer() and prevPlayers ~= self.raidRoster:len() and (not iLeft or prevPlayers == 2) then
local ts = time()

local players = {}
Expand Down

0 comments on commit 06351d4

Please sign in to comment.