From c48d032c1676bc5c4789fb12396a3d22a28a2d01 Mon Sep 17 00:00:00 2001 From: Tercio Jose Date: Wed, 2 Nov 2022 20:08:36 -0300 Subject: [PATCH] Fix for some error involving gradient color --- Libs/LibOpenRaid/LibOpenRaid.lua | 12 +++++++----- core/util.lua | 5 +++++ functions/schedules.lua | 4 ++-- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/Libs/LibOpenRaid/LibOpenRaid.lua b/Libs/LibOpenRaid/LibOpenRaid.lua index 2b973f6b..0f6cd720 100644 --- a/Libs/LibOpenRaid/LibOpenRaid.lua +++ b/Libs/LibOpenRaid/LibOpenRaid.lua @@ -68,7 +68,7 @@ if (WOW_PROJECT_ID ~= WOW_PROJECT_MAINLINE and not isExpansion_Dragonflight()) t end local major = "LibOpenRaid-1.0" -local CONST_LIB_VERSION = 68 +local CONST_LIB_VERSION = 69 LIB_OPEN_RAID_CAN_LOAD = false local unpack = table.unpack or _G.unpack @@ -1858,9 +1858,11 @@ end --internals function openRaidLib.CooldownManager.OnPlayerCast(event, spellId, isPlayerPet) --~cast --player casted a spell, check if the spell is registered as cooldown - local playerSpec = openRaidLib.GetPlayerSpecId() - if (playerSpec) then - if (LIB_OPEN_RAID_COOLDOWNS_BY_SPEC[playerSpec] and LIB_OPEN_RAID_COOLDOWNS_BY_SPEC[playerSpec][spellId]) then + --local playerSpec = openRaidLib.GetPlayerSpecId() --should be deprecated with cooldowns from spellbook + --if (playerSpec) then + --if (LIB_OPEN_RAID_COOLDOWNS_BY_SPEC[playerSpec] and LIB_OPEN_RAID_COOLDOWNS_BY_SPEC[playerSpec][spellId]) then --kinda deprecated with the new spell from spellbook + --issue: pet spells isn't in this table yet, might mess with pet interrupts + if (LIB_OPEN_RAID_PLAYERCOOLDOWNS[spellId]) then --check if the casted spell is a cooldown the player has available local playerName = UnitName("player") --get the cooldown time for this spell @@ -1881,7 +1883,7 @@ end --as there's just a few of them to monitor, there's no issue on creating one timer per spell cooldownStartTicker(spellId, timeLeft) end - end + --end end --when the player is ressed while in a group, send the cooldown list diff --git a/core/util.lua b/core/util.lua index 13ba7e15..a2a6c58a 100644 --- a/core/util.lua +++ b/core/util.lua @@ -1203,6 +1203,11 @@ end local blue_now = ThisGradient.StartBlue + (percent * ThisGradient.OnePercentBlue) local alpha_now = ThisGradient.StartAlpha + (percent * ThisGradient.OnePercentAlpha) + red_now = Saturate(red_now) + green_now = Saturate(green_now) + blue_now = Saturate(blue_now) + alpha_now = Saturate(alpha_now) + if (ThisGradient.ObjectType == "frame") then ThisGradient.Object:SetBackdropColor(red_now, green_now, blue_now, alpha_now) elseif (ThisGradient.ObjectType == "texture") then diff --git a/functions/schedules.lua b/functions/schedules.lua index d2e2680a..0f73183f 100644 --- a/functions/schedules.lua +++ b/functions/schedules.lua @@ -18,9 +18,9 @@ local triggerScheduledTick = function(tickerObject) local payload = tickerObject.payload local callback = tickerObject.callback - local result, errortext = xpcall(callback, errorHandler, unpack(payload)) + local result, errortext = xpcall(callback, geterrorhandler(), unpack(payload)) if (not result) then - Details:Msg("Error:", errortext, tickerObject.name or "") + --Details:Msg("Error:", errortext, tickerObject.name or "") end return result end