Skip to content
This repository was archived by the owner on Jan 21, 2024. It is now read-only.

Commit 571c8c8

Browse files
committed
Try to fix #350
1 parent db42b62 commit 571c8c8

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

Objects/BUTTON.lua

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -714,10 +714,14 @@ end
714714

715715
function BUTTON:UpdateItemCooldown()
716716
if self.item and self.isShown then
717+
local start, duration, enable, modrate
717718
if NeuronItemCache[self.item] then
718-
local start, duration, enable, modrate = GetItemCooldown(NeuronItemCache[self.item])
719-
self:SetCooldownTimer(start, duration, enable, self.cdText, modrate, self.cdcolor1, self.cdcolor2, self.cdAlpha)
719+
start, duration, enable, modrate = GetItemCooldown(NeuronItemCache[self.item])
720+
else
721+
local itemID = GetItemInfoInstant(self.item)
722+
start, duration, enable, modrate = GetItemCooldown(itemID)
720723
end
724+
self:SetCooldownTimer(start, duration, enable, self.cdText, modrate, self.cdcolor1, self.cdcolor2, self.cdAlpha)
721725
else
722726
self:CancelCooldownTimer(true)
723727
end

0 commit comments

Comments
 (0)