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

Commit

Permalink
fixes #260
Browse files Browse the repository at this point in the history
  • Loading branch information
brittyazel committed Jan 18, 2019
1 parent 4ec8e19 commit 3c0c0c7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
14 changes: 9 additions & 5 deletions Objects/ACTIONBUTTON.lua
Original file line number Diff line number Diff line change
Expand Up @@ -654,17 +654,16 @@ end

function ACTIONBUTTON:SetSpellState(spell)
local charges, maxCharges, chargeStart, chargeDuration = GetSpellCharges(spell)
local count = GetSpellCount(spell)

if (maxCharges and maxCharges > 1) then
self.count:SetText(charges)
elseif count and count > 0 then
self.count:SetText(count)
else
self.count:SetText("")
end

local count = GetSpellCount(spell)
if (count and count > 0) then
self.count:SetText(count)
end

if (NeuronCollectionCache[spell:lower()]) then
spell = NeuronCollectionCache[spell:lower()].spellID

Expand Down Expand Up @@ -1028,6 +1027,7 @@ end
ACTIONBUTTON.MODIFIER_STATE_CHANGED = ACTIONBUTTON.SPELLS_CHANGED



function ACTIONBUTTON:ACTIONBAR_SLOT_CHANGED(...)
if (self.data.macro_Watch or self.data.macro_Equip) then
self:UpdateIcon()
Expand Down Expand Up @@ -1085,8 +1085,12 @@ function ACTIONBUTTON:SPELL_UPDATE_CHARGES(...)
local spell = self.macrospell
local charges, maxCharges, chargeStart, chargeDuration = GetSpellCharges(spell)

local count = GetSpellCount(spell)

if (maxCharges and maxCharges > 1) then
self.count:SetText(charges)
elseif count and count > 0 then
self.count:SetText(count)
else
self.count:SetText("")
end
Expand Down
2 changes: 0 additions & 2 deletions Objects/BUTTON.lua
Original file line number Diff line number Diff line change
Expand Up @@ -638,8 +638,6 @@ function BUTTON:UpdateCooldown()
self:SetSpellCooldown(spell)
elseif (item and #item>0) then
self:SetItemCooldown(item)
else
self:SetCooldownTimer(0, 0, 0)
end
end

Expand Down
4 changes: 3 additions & 1 deletion Objects/EXTRABTN.lua
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ function EXTRABTN:ExtraButton_Update()

self.spellName, _, self.spellIcon = GetSpellInfo(self.spellID);

self:SetAttribute("action", self.actionID)
if not InCombatLockdown() then
self:SetAttribute("action", self.actionID)
end

if self.spellID then
self:SetButtonTex()
Expand Down

0 comments on commit 3c0c0c7

Please sign in to comment.