Libraries Updates, Quick fixes, Version bump for wow 11 launch

This commit is contained in:
Tercio Jose
2024-08-26 11:12:47 -03:00
committed by andrew6180
parent cec32b8d17
commit f392108ea2
7 changed files with 260 additions and 31 deletions
+25
View File
@@ -152,6 +152,31 @@ function openRaidLib.IsInGroup()
return inParty or inRaid
end
---return a table with unitName as keys and true as value
---@return table<string, boolean>
function openRaidLib.GetPlayersInTheGroup()
local playersInTheGroup = {}
if (IsInRaid()) then
for i = 1, GetNumGroupMembers() do
local unitName = GetUnitName("raid"..i, true)
if (unitName) then
playersInTheGroup[unitName] = true
end
end
elseif (IsInGroup()) then
for i = 1, GetNumGroupMembers() - 1 do
local unitName = GetUnitName("party"..i, true)
if (unitName) then
playersInTheGroup[unitName] = true
end
end
playersInTheGroup[UnitName("player")] = true
end
return playersInTheGroup
end
function openRaidLib.UpdateUnitIDCache()
openRaidLib.UnitIDCache = {}
if (IsInRaid()) then