From 8d93d677ca54f67ec87aeb9922525a5e9344b146 Mon Sep 17 00:00:00 2001 From: Tercio Jose Date: Thu, 15 Dec 2022 11:47:58 -0300 Subject: [PATCH] Fixed an issue with open raid library --- Libs/LibOpenRaid/Functions.lua | 6 ++++-- Libs/LibOpenRaid/LibOpenRaid.lua | 6 +++--- boot.lua | 4 ++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Libs/LibOpenRaid/Functions.lua b/Libs/LibOpenRaid/Functions.lua index 315bc580d..ade671402 100644 --- a/Libs/LibOpenRaid/Functions.lua +++ b/Libs/LibOpenRaid/Functions.lua @@ -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 diff --git a/Libs/LibOpenRaid/LibOpenRaid.lua b/Libs/LibOpenRaid/LibOpenRaid.lua index bd60a1fd4..ace138c9b 100644 --- a/Libs/LibOpenRaid/LibOpenRaid.lua +++ b/Libs/LibOpenRaid/LibOpenRaid.lua @@ -64,7 +64,7 @@ if (WOW_PROJECT_ID ~= WOW_PROJECT_MAINLINE and not isExpansion_Dragonflight()) t end local major = "LibOpenRaid-1.0" -local CONST_LIB_VERSION = 86 +local CONST_LIB_VERSION = 87 if (not LIB_OPEN_RAID_MAX_VERSION) then LIB_OPEN_RAID_MAX_VERSION = CONST_LIB_VERSION @@ -788,7 +788,7 @@ end --the group has changed, trigger a long timer to send full data --as the timer is unique, a new change to the group will replace and refresh the time --using random time, players won't trigger all at the same time - local randomTime = 1.0 + math.random(1.0, 5.5) + local randomTime = 0.3 + math.random(0, 0.7) openRaidLib.Schedules.NewUniqueTimer(randomTime, openRaidLib.mainControl.SendFullData, "mainControl", "sendFullData_Schedule") end @@ -1937,7 +1937,7 @@ end local timeLeft, charges, timeOffset, duration, updateTime, auraDuration = unpack(cooldownInfo) return timeLeft, charges, timeOffset, duration, updateTime, auraDuration end - + function openRaidLib.CooldownManager.OnPlayerCast(event, spellId, isPlayerPet) --~cast --player casted a spell, check if the spell is registered as cooldown --issue: pet spells isn't in this table yet, might mess with pet interrupts diff --git a/boot.lua b/boot.lua index fb5ba8e2d..058118594 100644 --- a/boot.lua +++ b/boot.lua @@ -6,8 +6,8 @@ local addonName, Details222 = ... local version, build, date, tocversion = GetBuildInfo() - _detalhes.build_counter = 10336 - _detalhes.alpha_build_counter = 10336 --if this is higher than the regular counter, use it instead + _detalhes.build_counter = 10337 + _detalhes.alpha_build_counter = 10337 --if this is higher than the regular counter, use it instead _detalhes.dont_open_news = true _detalhes.game_version = version _detalhes.userversion = version .. " " .. _detalhes.build_counter