Fixed an issue with open raid library

This commit is contained in:
Tercio Jose
2022-12-15 11:47:58 -03:00
parent 55f2159119
commit 8d93d677ca
3 changed files with 9 additions and 7 deletions
+4 -2
View File
@@ -148,19 +148,21 @@ function openRaidLib.UpdateUnitIDCache()
openRaidLib.UnitIDCache = {}
if (IsInRaid()) then
for i = 1, GetNumGroupMembers() do
local unitName = UnitName("raid"..i)
local unitName = GetUnitName("raid"..i, true)
if (unitName) then
openRaidLib.UnitIDCache[unitName] = "raid"..i
end
end
elseif (IsInGroup()) then
for i = 1, GetNumGroupMembers() - 1 do
local unitName = UnitName("party"..i)
local unitName = GetUnitName("party"..i, true)
if (unitName) then
openRaidLib.UnitIDCache[unitName] = "party"..i
end
end
end
openRaidLib.UnitIDCache[UnitName("player")] = "player"
end