From 28de6fd8358e7ef1febaa5a7bb4001179fd44273 Mon Sep 17 00:00:00 2001 From: Brues <5278969+brues-code@users.noreply.github.com> Date: Sat, 27 Jun 2026 18:57:21 -0500 Subject: [PATCH] =?UTF-8?q?finish=20UnitInRaid("player")=20=E2=86=92=20IsI?= =?UTF-8?q?nRaid()=20sweep?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Four more sites: GetUnbuffedRoster + SendChatMessageWide in api.lua, the loot menu's inRaid local, and the raid module's early-return guard. Same intent, named helper. --- api/api.lua | 4 ++-- modules/loot.lua | 2 +- modules/raid.lua | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/api.lua b/api/api.lua index 46d4de1f..4cbcd09f 100644 --- a/api/api.lua +++ b/api/api.lua @@ -208,7 +208,7 @@ function pfUI.api.GetUnbuffedRoster(name) end end - if UnitInRaid("player") then + if IsInRaid() then for i=1,40 do check("raid"..i) end else check("player") @@ -485,7 +485,7 @@ end -- 'msg' [string] the message to send function pfUI.api.SendChatMessageWide(msg) local channel = "SAY" - if UnitInRaid("player") then + if IsInRaid() then if ( IsRaidLeader() or IsRaidOfficer() ) then channel = "RAID_WARNING" else diff --git a/modules/loot.lua b/modules/loot.lua index 0f417a00..93a88dc6 100644 --- a/modules/loot.lua +++ b/modules/loot.lua @@ -323,7 +323,7 @@ pfUI:RegisterModule("loot", function () end function pfUI.loot:InitGroupDropDown() - local inRaid = UnitInRaid("player") + local inRaid = IsInRaid() if UIDROPDOWNMENU_MENU_LEVEL == 1 then if ( inRaid ) then pfUI.loot:BuildRaidMenu(UIDROPDOWNMENU_MENU_LEVEL) diff --git a/modules/raid.lua b/modules/raid.lua index c1348f78..0f52381f 100644 --- a/modules/raid.lua +++ b/modules/raid.lua @@ -106,7 +106,7 @@ pfUI:RegisterModule("raid", function () this.pendingUpdate = nil -- don't proceed without raid - if not UnitInRaid("player") then return end + if not IsInRaid() then return end -- clear all existing frames for i=1, maxraid do SetRaidIndex(pfUI.uf.raid[i], 0) end