Mercurial > wow > reaction
diff modules/ReAction_PetAction/ReAction_PetAction.lua @ 94:39265b16d208
Fixed handling of pet buttons past 10
author | Flick <flickerstreak@gmail.com> |
---|---|
date | Fri, 17 Oct 2008 23:46:30 +0000 |
parents | 567a885cdfad |
children | 168cae4aa8bd |
line wrap: on
line diff
--- a/modules/ReAction_PetAction/ReAction_PetAction.lua Fri Oct 17 23:13:44 2008 +0000 +++ b/modules/ReAction_PetAction/ReAction_PetAction.lua Fri Oct 17 23:46:30 2008 +0000 @@ -94,9 +94,15 @@ btnCfg[i] = {} end if btns[i] == nil then - local b = Button:New(bar,i,btnCfg[i]) - btns[i] = b - bar:AddButton(i,b) + local success, r = pcall(Button.New,Button,bar,i,btnCfg[i]) + if success and r then + btns[i] = r + bar:AddButton(i,r) + else + n = i - 1 + bar:ClipNButtons(n) + break + end end btns[i]:Refresh() end @@ -403,6 +409,7 @@ self.bar:PlaceButton(self, 30, 30) self:Update() self:UpdateHotkey() + self.frame:Show() end function Button:GetFrame()