# HG changeset patch # User Flick # Date 1287508128 0 # Node ID 07c76dbc023699070037ed2982ddedd64e4c34f9 # Parent eab7e7642dd6c33ae6ecf9c7cee3b7d6fd9122f7 minor cleanup for multicastbutton (drycoded) diff -r eab7e7642dd6 -r 07c76dbc0236 classes/MultiCastButton.lua --- a/classes/MultiCastButton.lua Tue Oct 19 16:49:40 2010 +0000 +++ b/classes/MultiCastButton.lua Tue Oct 19 17:08:48 2010 +0000 @@ -111,7 +111,9 @@ totemIDsBySlot[i] = self:GetAttribute("TOTEM_PRIORITY_"..i) end - summonSpells = summonSpells or newtable() -- set up in bar:SetupBarHeader() + -- these are set up in bar:SetupBarHeader() + flyoutChildren = flyoutChildren or newtable() + summonSpells = summonSpells or newtable() ]] local _onstate_multispellpage = -- function(self, stateid, newstate) @@ -166,11 +168,11 @@ else local offset = summonSlot or 0 local totemID = totemIDsBySlot[slot - offset] - local spells = newtable( 0, GetMultiCastTotemSpells(totemID) ) - if spells[page] then + local spell = select(page, 0, GetMultiCastTotemSpells(totemID) ) + if spell then b:SetAttribute("type","multispell") b:SetAttribute("action", baseActionID + (currentPage - 1)*slotsPerPage + totemID) - b:SetAttribute("spell", spells[page]) + b:SetAttribute("spell", spell) b:Show() lastButton = b lastPage = page