From cce2584e74c568e75497b4ffc041f20e13983b65 Mon Sep 17 00:00:00 2001 From: Tercio Jose Date: Mon, 22 Jan 2024 09:29:37 -0300 Subject: [PATCH] Fix for an error when starting a boss encounter on Wrath --- core/parser.lua | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/core/parser.lua b/core/parser.lua index 250e9f2dc..f204754d3 100755 --- a/core/parser.lua +++ b/core/parser.lua @@ -5781,8 +5781,19 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1 wipe(keystoneLevels) local libOpenRaid = LibStub("LibOpenRaid-1.0", true) - for i = 1, GetNumGroupMembers()-1 do - local unitId = "party" .. i + if (libOpenRaid) then + for i = 1, GetNumGroupMembers()-1 do + local unitId = "party" .. i + if (UnitExists(unitId)) then + local unitKeystoneInfo = libOpenRaid.GetKeystoneInfo(unitId) + if (unitKeystoneInfo) then + local unitName = Details:GetFullName(unitId) + keystoneLevels[unitName] = unitKeystoneInfo.level + end + end + end + + local unitId = "player" if (UnitExists(unitId)) then local unitKeystoneInfo = libOpenRaid.GetKeystoneInfo(unitId) if (unitKeystoneInfo) then @@ -5791,15 +5802,6 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1 end end end - - local unitId = "player" - if (UnitExists(unitId)) then - local unitKeystoneInfo = libOpenRaid.GetKeystoneInfo(unitId) - if (unitKeystoneInfo) then - local unitName = Details:GetFullName(unitId) - keystoneLevels[unitName] = unitKeystoneInfo.level - end - end end function Details222.CacheKeystoneForAllGroupMembers()