Mercurial > wow > buffalo2
comparison Modules/BuffFrame.lua @ 115:8c94bee4fdfc
- AddHandler simplified
- Centralized combat start/stop hooks
- WorldState removed
| author | Nenue |
|---|---|
| date | Tue, 28 Mar 2017 07:02:26 -0400 |
| parents | 73316951ce73 |
| children | 1f68c46bc4de |
comparison
equal
deleted
inserted
replaced
| 114:6748c98a6c6c | 115:8c94bee4fdfc |
|---|---|
| 39 local DURATION_INSET = 1 | 39 local DURATION_INSET = 1 |
| 40 local DURATION_PARENT | 40 local DURATION_PARENT |
| 41 | 41 |
| 42 VeneerBuffFrameMixin = { | 42 VeneerBuffFrameMixin = { |
| 43 moduleName = 'Buff Frames', | 43 moduleName = 'Buff Frames', |
| 44 defaultCluster = 'TOPRIGHT', | 44 anchorPoint = 'TOPRIGHT', |
| 45 anchorX = BUFF_FRAMES_X, | 45 anchorX = BUFF_FRAMES_X, |
| 46 anchorY = BUFF_FRAMES_Y, | 46 anchorY = BUFF_FRAMES_Y, |
| 47 anchorPoint = 'TOPRIGHT', | 47 |
| 48 Buttons = {}, | 48 Buttons = {}, |
| 49 DetectedFrames = {}, | 49 DetectedFrames = {}, |
| 50 AuraCache = {} | 50 AuraCache = {} |
| 51 } | 51 } |
| 52 VeneerBuffFrameButtonMixin = {} | 52 VeneerBuffFrameButtonMixin = {} |
| 286 end | 286 end |
| 287 return frame | 287 return frame |
| 288 end | 288 end |
| 289 | 289 |
| 290 function plugin:OnLoad() | 290 function plugin:OnLoad() |
| 291 Veneer:AddHandler(self, self.defaultCluster) | 291 print(self:GetName(), 'OnLoad()') |
| 292 Veneer:AddHandler(self) | |
| 292 end | 293 end |
| 293 | 294 |
| 294 function plugin:Setup() | 295 function plugin:Setup() |
| 295 | 296 print(self:GetName(), 'Setup()') |
| 296 | |
| 297 hooksecurefunc("BuffFrame_Update", function(...) self:OnBuffFrameUpdate(...) end) | 297 hooksecurefunc("BuffFrame_Update", function(...) self:OnBuffFrameUpdate(...) end) |
| 298 hooksecurefunc("AuraButton_UpdateDuration", function(...) self:OnUpdateDuration(...) end) | 298 hooksecurefunc("AuraButton_UpdateDuration", function(...) self:OnUpdateDuration(...) end) |
| 299 hooksecurefunc("AuraButton_Update", function(...) self:OnAuraButton_Update(...) end) | 299 hooksecurefunc("AuraButton_Update", function(...) self:OnAuraButton_Update(...) end) |
| 300 hooksecurefunc("BuffFrame_UpdateAllBuffAnchors", function(...) self:OnUpdateAllBuffAnchors(...) end) | 300 hooksecurefunc("BuffFrame_UpdateAllBuffAnchors", function(...) self:OnUpdateAllBuffAnchors(...) end) |
| 301 hooksecurefunc("TemporaryEnchantFrame_Update", function(...) self:OnTemporaryEnchantFrameUpdate(...) end) | 301 hooksecurefunc("TemporaryEnchantFrame_Update", function(...) self:OnTemporaryEnchantFrameUpdate(...) end) |
