Mercurial > wow > reaction
comparison StanceButton.lua @ 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 | c918ff9ac787 |
comparison
equal
deleted
inserted
replaced
| 248:9e708a155ab9 | 249:46b59a9ded76 |
|---|---|
| 59 | 59 |
| 60 local f = self:GetFrame() | 60 local f = self:GetFrame() |
| 61 local barFrame = bar:GetFrame() | 61 local barFrame = bar:GetFrame() |
| 62 local config = self:GetConfig() | 62 local config = self:GetConfig() |
| 63 | 63 |
| 64 -- set up the base stance ID | 64 -- set up the stance ID |
| 65 self:SetActionIDPool("stance",8) | 65 config.stanceID = config.stanceID or idx |
| 66 config.stanceID = self:AcquireActionID(config.stanceID, idHint, true) | |
| 67 | 66 |
| 68 -- attribute setup | 67 -- attribute setup |
| 69 f:SetAttribute("type","spell") | 68 f:SetAttribute("type","spell") |
| 70 | 69 |
| 71 -- non secure scripts | 70 -- non secure scripts |
| 97 return self | 96 return self |
| 98 end | 97 end |
| 99 | 98 |
| 100 function Stance:GetActionID() | 99 function Stance:GetActionID() |
| 101 return self.config.stanceID | 100 return self.config.stanceID |
| 101 end | |
| 102 | |
| 103 function Stance:AcquireActionID() | |
| 104 -- don't use pool | |
| 105 end | |
| 106 | |
| 107 function Stance:ReleaseActionID() | |
| 108 -- don't use pool | |
| 102 end | 109 end |
| 103 | 110 |
| 104 function Stance:UpdateAction() | 111 function Stance:UpdateAction() |
| 105 if InCombatLockdown() then | 112 if InCombatLockdown() then |
| 106 self.updatePending = true | 113 self.updatePending = true |
