Mercurial > wow > reaction
changeset 249:46b59a9ded76
Fix some errors related to re-using action IDs
author | Flick |
---|---|
date | Mon, 28 Mar 2011 14:52:35 -0700 |
parents | 9e708a155ab9 |
children | d7a7ef367faf |
files | Button.lua StanceButton.lua VehicleExitButton.lua |
diffstat | 3 files changed, 19 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/Button.lua Mon Mar 28 10:43:36 2011 -0700 +++ b/Button.lua Mon Mar 28 14:52:35 2011 -0700 @@ -233,7 +233,7 @@ end if id == nil then if unique then - return nil + error(("All action IDs for bars of type '%s' are in use, cannot create any more buttons"):format(self.config.barType)) end pool.nWraps = nWraps + 1 end
--- a/StanceButton.lua Mon Mar 28 10:43:36 2011 -0700 +++ b/StanceButton.lua Mon Mar 28 14:52:35 2011 -0700 @@ -61,9 +61,8 @@ local barFrame = bar:GetFrame() local config = self:GetConfig() - -- set up the base stance ID - self:SetActionIDPool("stance",8) - config.stanceID = self:AcquireActionID(config.stanceID, idHint, true) + -- set up the stance ID + config.stanceID = config.stanceID or idx -- attribute setup f:SetAttribute("type","spell") @@ -101,6 +100,14 @@ return self.config.stanceID end +function Stance:AcquireActionID() + -- don't use pool +end + +function Stance:ReleaseActionID() + -- don't use pool +end + function Stance:UpdateAction() if InCombatLockdown() then self.updatePending = true
--- a/VehicleExitButton.lua Mon Mar 28 10:43:36 2011 -0700 +++ b/VehicleExitButton.lua Mon Mar 28 14:52:35 2011 -0700 @@ -70,6 +70,14 @@ return 1 end +function VExitButton:AcquireActionID() + -- don't use pool +end + +function VExitButton:ReleaseActionID() + -- don't use pool +end + function VExitButton:Refresh() Super.Refresh(self) -- it seems that setscale kills the texcoord, have to refresh it