Libraries Updates, Quick fixes, Version bump for wow 11 launch
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user