Skip to content

Commit

Permalink
Fix for some error involving gradient color
Browse files Browse the repository at this point in the history
  • Loading branch information
Tercioo committed Nov 2, 2022
1 parent 61e7f2a commit c48d032
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
12 changes: 7 additions & 5 deletions Libs/LibOpenRaid/LibOpenRaid.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
5 changes: 5 additions & 0 deletions core/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions functions/schedules.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c48d032

Please sign in to comment.