Mercurial > wow > buffalo2
comparison BuffFrame/RaidBuffTray.lua @ 59:07ef62fe201f
Re-write of BuffFrame module:
- uses secure hooks on blizzard BuffFrame.lua functions to determine needed action
- make use of built-in table behavior to reduce unnecessary frame updates
| author | Nenue |
|---|---|
| date | Thu, 28 Jul 2016 18:27:56 -0400 |
| parents | 5cedcb683eda |
| children |
comparison
equal
deleted
inserted
replaced
| 58:f253baf6022d | 59:07ef62fe201f |
|---|---|
| 39 return | 39 return |
| 40 end | 40 end |
| 41 local styleset = Aura.BuffStyles[style] | 41 local styleset = Aura.BuffStyles[style] |
| 42 if not path or path == '' then | 42 if not path or path == '' then |
| 43 print('path is nil/empty') | 43 print('path is nil/empty') |
| 44 icon:SetTexture(1, 1, 1, 1) | 44 icon:SetColorTexture(1, 1, 1, 1) |
| 45 icon:SetVertexColor(unpack(styleset.Color)) | 45 icon:SetVertexColor(unpack(styleset.Color)) |
| 46 else | 46 else |
| 47 icon:SetTexture(path or icon:GetTexture()) | 47 icon:SetTexture(path or icon:GetTexture()) |
| 48 icon:SetVertexColor(unpack(styleset.Color)) | 48 icon:SetVertexColor(unpack(styleset.Color)) |
| 49 end | 49 end |
| 201 end | 201 end |
| 202 | 202 |
| 203 local missingTypes = {} | 203 local missingTypes = {} |
| 204 local raidBuffsInitialized | 204 local raidBuffsInitialized |
| 205 Aura.UpdateRaidBuffs = function() | 205 Aura.UpdateRaidBuffs = function() |
| 206 --[[ | |
| 207 | |
| 206 | 208 |
| 207 local c = Aura.displays.ConsolidatedBuff.conf | 209 local c = Aura.displays.ConsolidatedBuff.conf |
| 208 local anchor = _G[c.Parent..'Anchor'] | 210 local anchor = _G[c.Parent..'Anchor'] |
| 209 local print = xprint | 211 local print = xprint |
| 210 if not consolidatedBuffsLoaded then | 212 if not consolidatedBuffsLoaded then |
| 325 elseif missingBuffsAnchor and missingBuffsAnchor:IsVisible() then | 327 elseif missingBuffsAnchor and missingBuffsAnchor:IsVisible() then |
| 326 for i = 1, NUM_LE_MISSING_RAID_BUFFS do | 328 for i = 1, NUM_LE_MISSING_RAID_BUFFS do |
| 327 missingBuffs[i]:Hide() | 329 missingBuffs[i]:Hide() |
| 328 end | 330 end |
| 329 end | 331 end |
| 332 | |
| 333 ]] | |
| 330 end | 334 end |
| 331 | 335 |
| 332 vn.UpdateMissingBuffs = function() | 336 vn.UpdateMissingBuffs = function() |
| 333 local print = vn.fprint() | 337 local print = vn.fprint() |
| 334 local numMissing = 0 | 338 local numMissing = 0 |
