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

Commit

Permalink
Fix extractionbutton and zone button sometimes not working
Browse files Browse the repository at this point in the history
  • Loading branch information
brittyazel committed Jan 25, 2019
1 parent 93bb2c5 commit b4f5c5b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions Objects/EXTRABTN.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ function EXTRABTN:SetType()
self:RegisterEvent("SPELL_UPDATE_CHARGES", "OnEvent")
self:RegisterUnitEvent("UNIT_AURA", "player")

self:SetAttribute("type", "action")
self:SetAttribute("type1", "action")
self:SetAttribute("useparent-unit", false)
self:SetAttribute("unit", ATTRIBUTE_NOOP)
--action content gets set in UpdateButton
self:UpdateButton()

Expand Down Expand Up @@ -101,7 +103,7 @@ function EXTRABTN:UpdateButton()
self:UpdateIcon()

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

self:SetSpellCooldown(self.spellID)
Expand Down
6 changes: 4 additions & 2 deletions Objects/ZONEABILITYBTN.lua
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ function ZONEABILITYBTN:SetType()
self:RegisterEvent("SPELL_UPDATE_COOLDOWN", "OnEvent")
self:RegisterEvent("SPELL_UPDATE_CHARGES", "OnEvent")

self:SetAttribute("type", "macro")
self:SetAttribute("type1", "macro")
self:SetAttribute("useparent-unit", false)
self:SetAttribute("unit", ATTRIBUTE_NOOP)
--macro content gets set in UpdateButton
self:UpdateButton()

Expand Down Expand Up @@ -93,7 +95,7 @@ function ZONEABILITYBTN:UpdateButton()
self:UpdateIcon()

if (self.spellName and not InCombatLockdown()) then
self:SetAttribute("macrotext", "/cast " .. self.spellName .. "();")
self:SetAttribute("macrotext1", "/cast " .. self.spellName .. "();")
end

self:SetSpellCooldown(self.spellID)
Expand Down

0 comments on commit b4f5c5b

Please sign in to comment.