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

Commit 07333f0

Browse files
committed
small cleanup
1 parent 43f989d commit 07333f0

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

Objects/BUTTON.lua

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -654,21 +654,24 @@ end
654654

655655

656656
function BUTTON:UpdateCooldown()
657-
local spell, item, show = self.macrospell, self.macroitem, self.macroshow
658657

659658
if (self.actionID) then
660659
self:ACTION_SetCooldown(self.actionID)
661-
elseif (show and #show>0) then
662-
if (NeuronItemCache[show]) then
663-
self:SetItemCooldown(show)
660+
661+
elseif (self.macroshow and #self.macroshow>0) then
662+
663+
if (NeuronItemCache[self.macroshow]) then
664+
self:SetItemCooldown(self.macroshow)
664665
else
665-
self:SetSpellCooldown(show)
666+
self:SetSpellCooldown(self.macroshow)
666667
end
667668

668-
elseif (spell and #spell>0) then
669-
self:SetSpellCooldown(spell)
670-
elseif (item and #item>0) then
671-
self:SetItemCooldown(item)
669+
elseif (self.macrospell and #self.macrospell>0) then
670+
self:SetSpellCooldown(self.macrospell)
671+
672+
elseif (self.macroitem and #self.macroitem>0) then
673+
self:SetItemCooldown(self.macroitem)
674+
672675
else
673676
--this is super important for removing CD's from empty buttons, like when switching states. You don't want the CD from one state to show on a different state.
674677
self:SetCooldownTimer()

0 commit comments

Comments
 (0)