annotate Modules/BuffFrame.lua @ 78:08951972041a

- adjust top anchors for OrderHallCommandBar
author Nenue
date Tue, 30 Aug 2016 03:32:22 -0400
parents d9d16e67725c
children 0784b87f9722
rev   line source
Nenue@59 1 -- Veneer
Nenue@59 2 -- BuffFrame.lua
Nenue@59 3 -- Created: 7/27/2016 8:08 PM
Nenue@59 4 -- %file-revision%
Nenue@62 5 --[[
Nenue@62 6 Adds progress bars and cooldown swirls to buffbutton frames
Nenue@60 7
Nenue@62 8 Known Limitations:
Nenue@62 9 - Individual BuffButton frames are created upon use, making it difficult to do any sort of securestate priming
Nenue@62 10 - TempEnchant info returns relative values only, and they don't synchronize with aura events
Nenue@62 11 - BuffButtons can only be hidden/shown by blizzcode, so functions doing that have to be accounted for
Nenue@62 12 --]]
Nenue@62 13
Nenue@75 14 local BUFFS_PER_ROW = 12
Nenue@64 15 local BUFF_BUTTON_SIZE = 48
Nenue@71 16 local BUFF_BUTTON_SPACING_H = 4
Nenue@71 17 local BUFF_BUTTON_SPACING_V = 14
Nenue@64 18 local BUFF_PROGRESS_SIZE = 4
Nenue@64 19 local BUFF_PROGRESS_INSET = 1
Nenue@68 20 local BUFF_BUTTON_ZOOM = .15
Nenue@71 21 local BORDER_SIZE_L = 0
Nenue@71 22 local BORDER_SIZE_R = 0
Nenue@70 23 local BORDER_SIZE_U = 4
Nenue@71 24 local BORDER_SIZE_D = 0
Nenue@75 25 local BUFF_FRAMES_X = -230
Nenue@75 26 local BUFF_FRAMES_Y = -4
Nenue@64 27
Nenue@62 28
Nenue@62 29 local plugin = CreateFrame('Frame', 'VeneerBuffFrame', UIParent)
Nenue@75 30 local vn, print = LibStub("LibKraken").register(Veneer, plugin)
Nenue@68 31 local tprint = DEVIAN_WORKSPACE and function(...) _G.print('Timer', ...) end or function() end
Nenue@59 32
Nenue@68 33 local _G, UIParent = _G, UIParent
Nenue@68 34 local tinsert, tremove, unpack, select, tconcat = table.insert, table.remove, unpack, select, table.concat
Nenue@68 35 local floor, tonumber, format = math.floor, tonumber, string.format
Nenue@68 36 local UnitAura, GetTime, CreateFrame = UnitAura, GetTime, CreateFrame
Nenue@68 37 local hooksecurefunc = hooksecurefunc
Nenue@59 38
Nenue@75 39 local aurasCache = {}
Nenue@75 40 local skinnedFrames = {}
Nenue@75 41 local pendingFrames = {}
Nenue@75 42 local veneers = {}
Nenue@75 43 local expirationCache = {}
Nenue@75 44 local visibility = {}
Nenue@75 45 local isHooked = {}
Nenue@75 46
Nenue@75 47 plugin.options = {
Nenue@75 48 nameString = 'Buff Frames',
Nenue@59 49 {
Nenue@75 50 name = 'BuffButtonZoom',
Nenue@75 51 type = 'slider',
Nenue@75 52 min = 0,
Nenue@75 53 max = 100,
Nenue@75 54 fullwidth = true,
Nenue@59 55 },
Nenue@59 56 {
Nenue@75 57 name = 'BuffBorderLeft',
Nenue@75 58 type = 'slider',
Nenue@75 59 min = 0,
Nenue@75 60 max = 16,
Nenue@59 61 },
Nenue@59 62 {
Nenue@75 63 name = 'BuffBorderLeft',
Nenue@75 64 type = 'slider',
Nenue@75 65 min = 0,
Nenue@75 66 max = 16,
Nenue@59 67 }
Nenue@59 68 }
Nenue@59 69
Nenue@59 70
Nenue@59 71 local GetVeneer = function(frame)
Nenue@75 72
Nenue@75 73 if not (veneers[frame]) then
Nenue@75 74 local name = frame:GetName()
Nenue@68 75 print('|cFF88FF00Creating', name,'Veneer')
Nenue@73 76 local veneer = vn.GetVeneer(frame, 'VeneerBuffTemplate')
Nenue@60 77 local id = frame:GetID()
Nenue@59 78
Nenue@59 79
Nenue@71 80 veneer.progress:SetPoint('BOTTOMLEFT', veneer, 'BOTTOMLEFT', 0, -6)
Nenue@71 81 veneer.progress:SetPoint('TOPRIGHT', veneer, 'BOTTOMRIGHT', 0, -1)
Nenue@68 82 veneer.progress:SetHeight(BUFF_PROGRESS_SIZE + (BUFF_PROGRESS_INSET * 2))
Nenue@59 83
Nenue@75 84 veneer.progress.bg:SetColorTexture(0,0,0,1)
Nenue@75 85
Nenue@75 86 veneer.progress.fg:SetColorTexture(1,1,1,1)
Nenue@75 87 veneer.progress.fg:ClearAllPoints()
Nenue@68 88 veneer.progress.fg:SetPoint('BOTTOMLEFT', BUFF_PROGRESS_INSET,BUFF_PROGRESS_INSET)
Nenue@68 89 veneer.progress.fg:SetPoint('TOP', 0, -BUFF_PROGRESS_INSET)
Nenue@59 90
Nenue@73 91 veneer.duration:SetFontObject(VeneerNumberFont)
Nenue@74 92 veneer.duration:ClearAllPoints()
Nenue@74 93 veneer.duration:SetPoint('BOTTOM', veneer, 'BOTTOM', 0, 2)
Nenue@59 94
Nenue@69 95 veneer.count:SetFontObject(VeneerNumberFont)
Nenue@74 96 veneer.count:ClearAllPoints()
Nenue@74 97 veneer.count:SetPoint('TOPRIGHT', veneer, 'TOPRIGHT', -3, -3)
Nenue@68 98
Nenue@73 99 veneer.underlay:SetParent(UIParent)
Nenue@73 100 veneer.underlay:SetFrameStrata('BACKGROUND')
Nenue@74 101 veneer.border:SetColorTexture(0,0,0,0)
Nenue@68 102 veneer.border:SetPoint('TOPLEFT', veneer, 'TOPLEFT', -BORDER_SIZE_L, BORDER_SIZE_U)
Nenue@68 103 veneer.border:SetPoint('BOTTOMRIGHT', veneer, 'BOTTOMRIGHT', BORDER_SIZE_R, -BORDER_SIZE_D)
Nenue@68 104 veneer.border:Show()
Nenue@68 105
Nenue@69 106
Nenue@75 107 veneers[frame] = veneer
Nenue@59 108 end
Nenue@59 109
Nenue@59 110
Nenue@75 111 return veneers[frame]
Nenue@59 112 end
Nenue@59 113
Nenue@68 114
Nenue@68 115 -- Associates skinning elements with said button
Nenue@68 116 local SkinFrame = function(name)
Nenue@68 117 local frame = _G[name ]
Nenue@68 118 if skinnedFrames[frame] then
Nenue@68 119 print('|cFFFF4400Attempting to skin a frame that already went through.|r')
Nenue@68 120 return
Nenue@68 121 end
Nenue@68 122 print('|cFFFFFF00Adopting', name)
Nenue@68 123
Nenue@68 124 local icon = _G[name .. 'Icon']
Nenue@68 125 local border = _G[name .. 'Border']
Nenue@68 126 local count = _G[name .. 'Count']
Nenue@68 127 local duration = _G[name .. 'Duration']
Nenue@69 128 local veneer = GetVeneer(frame)
Nenue@68 129
Nenue@68 130 skinnedFrames[frame] = frame
Nenue@68 131 frame:SetSize(BUFF_BUTTON_SIZE,BUFF_BUTTON_SIZE)
Nenue@68 132
Nenue@78 133
Nenue@68 134 local offset = BUFF_BUTTON_ZOOM/2
Nenue@68 135 icon:SetTexCoord(offset, 1 - offset, offset, 1 - offset)
Nenue@68 136 if border then
Nenue@68 137 border:Hide()
Nenue@68 138 hooksecurefunc(border, 'SetVertexColor', function(frame, r, g, b, a)
Nenue@68 139 frame:Hide()
Nenue@68 140 print('|cFF0088FFborder:SetVertexColor|r', r,g,b,a)
Nenue@71 141 veneer.progress.fg:SetColorTexture(r,g,b,a)
Nenue@68 142 end)
Nenue@68 143
Nenue@68 144 local color = DebuffTypeColor["none"]
Nenue@68 145 if aurasCache[frame] and aurasCache[frame][5] then
Nenue@68 146 color = DebuffTypeColor[aurasCache[frame][5]]
Nenue@68 147 end
Nenue@68 148
Nenue@71 149 veneer.progress.fg:SetColorTexture(color.r,color.g,color.b)
Nenue@75 150 veneer.border:SetColorTexture(0,0,0,1)
Nenue@68 151 end
Nenue@68 152 if duration then
Nenue@68 153 duration:ClearAllPoints()
Nenue@69 154 --duration:SetPoint('TOP', frame, 'BOTTOM', 0, -8)
Nenue@69 155 --duration:SetFontObject(VeneerNumberFont)
Nenue@69 156 --duration:SetDrawLayer('OVERLAY')
Nenue@68 157
Nenue@69 158 hooksecurefunc(duration, 'Hide', function(self, text)
Nenue@69 159 veneer.duration:Hide()
Nenue@69 160 end)
Nenue@69 161 hooksecurefunc(duration, 'Show', function(self, text)
Nenue@69 162 veneer.duration:Show()
Nenue@69 163 end)
Nenue@69 164 end
Nenue@69 165 if count then
Nenue@69 166 count:ClearAllPoints()
Nenue@69 167 hooksecurefunc(count, 'SetText', function(self, text)
Nenue@74 168 print(self:GetName(), 'SetText', text)
Nenue@74 169 local n = veneer.count:GetNumPoints()
Nenue@74 170 for i = 1, n do
Nenue@74 171 print(i, veneer.count:GetPoint(n))
Nenue@74 172 end
Nenue@74 173 veneer.count.isUpdating = true
Nenue@69 174 self:Hide()
Nenue@74 175 veneer.count:Show()
Nenue@69 176 veneer.count:SetText(text)
Nenue@74 177 veneer.count.isUpdating = false
Nenue@69 178 end)
Nenue@74 179 hooksecurefunc(count, 'Hide', function(self)
Nenue@74 180 if veneer.count.isUpdating then
Nenue@74 181 print('|cFFFF4400blocked Hide hook|r')
Nenue@74 182 return
Nenue@74 183 end
Nenue@74 184
Nenue@74 185 print(self:GetName(), 'Hide')
Nenue@69 186 veneer.count:Hide()
Nenue@69 187 end)
Nenue@74 188 hooksecurefunc(count, 'Show', function(self)
Nenue@74 189 print(self:GetName(), 'Show')
Nenue@69 190 veneer.count:Show()
Nenue@69 191 end)
Nenue@68 192 end
Nenue@68 193
Nenue@68 194
Nenue@68 195 hooksecurefunc(frame, "Hide", function(self)
Nenue@68 196 local isVisible = self:IsVisible()
Nenue@68 197 if isVisible ~= visibility[self] then
Nenue@68 198 visibility[self] = isVisible
Nenue@68 199 end
Nenue@68 200 veneer:Hide()
Nenue@73 201 veneer.underlay:Hide()
Nenue@68 202 end)
Nenue@68 203
Nenue@68 204 hooksecurefunc(frame, 'Show', function(self)
Nenue@68 205 veneer:Show()
Nenue@68 206 local isVisible = self:IsVisible()
Nenue@68 207 if isVisible ~= visibility[self] then
Nenue@68 208 print('|cFFFFFF00SHOW|r', self:GetName())
Nenue@68 209 visibility[self] = isVisible
Nenue@68 210 end
Nenue@74 211 veneer.underlay:Show()
Nenue@68 212 end)
Nenue@68 213
Nenue@68 214 end
Nenue@68 215
Nenue@68 216
Nenue@61 217 --- Set widgets to reflect the passed parameters
Nenue@59 218 local UpdateVeneer = function (frame, duration, expires)
Nenue@59 219 local veneer = GetVeneer(frame)
Nenue@68 220 -- is it a new button?
Nenue@68 221 if not skinnedFrames[frame] then
Nenue@68 222 SkinFrame(frame:GetName())
Nenue@68 223 end
Nenue@68 224
Nenue@68 225 if frame.filter == 'HARMFUL' then
Nenue@68 226
Nenue@68 227 veneer.border:Show()
Nenue@74 228 else
Nenue@74 229 veneer.border:Hide()
Nenue@68 230 end
Nenue@68 231
Nenue@59 232
Nenue@61 233 if expires and duration then
Nenue@61 234 if duration ~= 0 then
Nenue@61 235 local startTime = (expires - duration)
Nenue@61 236 local endTime = expires or 0
Nenue@61 237 print('|cFF0088FF'..frame:GetName()..'|r', duration, expires)
Nenue@61 238 veneer.progress:Show()
Nenue@61 239 veneer.elapsed = 0
Nenue@61 240 veneer.progress:SetScript('OnUpdate', function(self, elapsed)
Nenue@61 241 veneer.elapsed = veneer.elapsed + elapsed
Nenue@60 242
Nenue@67 243 local w = floor(veneer.progress:GetWidth()+.5) - (BUFF_PROGRESS_INSET*2)
Nenue@61 244 local t = GetTime()
Nenue@61 245 local progress = (t - startTime) / duration
Nenue@61 246
Nenue@67 247 local nw = (w - (w * progress))
Nenue@61 248 if veneer.elapsed >= 0.25 then
Nenue@61 249
Nenue@68 250 tprint(t, startTime, floor(progress*100), w * progress, nw, w)
Nenue@61 251 veneer.elapsed = 0.25 - veneer.elapsed
Nenue@61 252 end
Nenue@61 253 if (progress >= 1) or not frame:IsVisible() then
Nenue@61 254 veneer.startTime = nil
Nenue@61 255 self:Hide()
Nenue@61 256 self:SetScript('OnUpdate', nil)
Nenue@61 257 else
Nenue@61 258 self.fg:SetWidth(nw)
Nenue@61 259 end
Nenue@61 260 end)
Nenue@61 261
Nenue@61 262 veneer.cooldown:Show()
Nenue@61 263 veneer.cooldown:SetCooldown(startTime, duration)
Nenue@61 264 else
Nenue@61 265 print('|cFF00FF88'..frame:GetName()..'|r', 'duration zero')
Nenue@61 266 veneer.progress:SetScript('OnUpdate', nil)
Nenue@61 267 veneer.progress:Hide()
Nenue@61 268 veneer.cooldown:Hide()
Nenue@61 269 end
Nenue@61 270 else
Nenue@61 271 veneer.progress:Hide()
Nenue@61 272 veneer.cooldown:SetCooldown(0,0)
Nenue@61 273 veneer.cooldown:Hide()
Nenue@61 274 print('|cFF88FF00'..frame:GetName()..'|r', 'nil duration')
Nenue@59 275 end
Nenue@59 276 veneer:Show()
Nenue@59 277 end
Nenue@59 278
Nenue@59 279
Nenue@59 280 --- Provides the number of changed indices for use in deciding between partial and full veneer updates
Nenue@59 281 local CacheCheck = function(frame, ...)
Nenue@59 282 aurasCache[frame] = aurasCache[frame] or {}
Nenue@59 283 local hasChange = 0
Nenue@59 284 local numVals = select('#',...)
Nenue@59 285 for i = 1, numVals do
Nenue@59 286 local arg = select(i, ...)
Nenue@59 287 if aurasCache[frame][i] ~= arg then
Nenue@59 288 hasChange = hasChange + 1
Nenue@59 289 end
Nenue@59 290 aurasCache[frame][i] = arg
Nenue@59 291 end
Nenue@59 292 return hasChange
Nenue@59 293 end
Nenue@59 294
Nenue@59 295 local AuraButton_Update = function(name, index, filter)
Nenue@59 296 local bName = name..index
Nenue@59 297 local frame = _G[bName]
Nenue@59 298 if frame and frame:IsVisible() then
Nenue@59 299 local cacheDiff = CacheCheck(frame, UnitAura(frame.unit, frame:GetID(), frame.filter))
Nenue@61 300 -- if the name or expirationTime changed
Nenue@61 301 if (cacheDiff >= 1) then
Nenue@68 302 print('|cFFFF4400', frame:GetName(), 'diff:', cacheDiff)
Nenue@61 303 if not skinnedFrames[frame] then
Nenue@61 304 tinsert(pendingFrames, frame)
Nenue@61 305 end
Nenue@59 306 expirationCache[name] = frame.expirationTime
Nenue@59 307 print(unpack(aurasCache[frame]))
Nenue@68 308
Nenue@59 309 UpdateVeneer(frame, aurasCache[frame][6], aurasCache[frame][7])
Nenue@59 310 end
Nenue@59 311
Nenue@59 312 end
Nenue@59 313 end
Nenue@59 314
Nenue@59 315 local BuffFrame_UpdateAllBuffAnchors = function()
Nenue@59 316 local todo = {}
Nenue@59 317 if #pendingFrames >= 1 then
Nenue@59 318
Nenue@59 319 print('|cFFBBFF00AllBuffAnchors|r', #pendingFrames)
Nenue@59 320 while pendingFrames[1] do
Nenue@59 321 local frame = tremove(pendingFrames)
Nenue@59 322 tinsert(todo, frame:GetName())
Nenue@59 323
Nenue@61 324 -- re-apply custom anchors
Nenue@59 325 end
Nenue@68 326 print(tconcat(todo, ', '))
Nenue@59 327 end
Nenue@59 328 --BuffButton1
Nenue@59 329 --DebuffButton1
Nenue@61 330 --todo: separate frame groups and iterate over them at appropriate times
Nenue@60 331 if BuffButton1 then
Nenue@78 332
Nenue@68 333 TempEnchant1:SetPoint('TOPRIGHT', BuffButton1, 'TOPRIGHT', BuffButton1:GetWidth()+4, 0)
Nenue@60 334 end
Nenue@60 335
Nenue@70 336 local lastBuff, topBuff
Nenue@74 337 local numBuffs = 0
Nenue@70 338 for i = 1, BUFF_ACTUAL_DISPLAY do
Nenue@70 339 local buff = _G['BuffButton'..i]
Nenue@70 340 if buff then
Nenue@74 341 numBuffs = numBuffs + 1
Nenue@74 342 buff:ClearAllPoints()
Nenue@75 343 if mod(numBuffs,BUFFS_PER_ROW) == 1 then
Nenue@74 344 if numBuffs == 1 then
Nenue@78 345 if OrderHallCommandBar and OrderHallCommandBar:IsVisible() then
Nenue@78 346 buff:SetPoint('TOPRIGHT', OrderHallCommandBar, 'BOTTOMRIGHT', BUFF_FRAMES_X, BUFF_FRAMES_Y)
Nenue@78 347 else
Nenue@78 348 buff:SetPoint('TOPRIGHT', UIParent, 'TOPRIGHT', BUFF_FRAMES_X, BUFF_FRAMES_Y)
Nenue@78 349 end
Nenue@74 350 plugin.currentTop = buff:GetTop()
Nenue@71 351 else
Nenue@71 352 buff:SetPoint('TOPRIGHT', topBuff, 'BOTTOMRIGHT', 0, -BUFF_BUTTON_SPACING_V)
Nenue@71 353 end
Nenue@70 354 topBuff = buff
Nenue@70 355 else
Nenue@71 356 buff:SetPoint('TOPRIGHT', lastBuff, 'TOPLEFT', -BUFF_BUTTON_SPACING_H, 0)
Nenue@70 357 end
Nenue@70 358 lastBuff = buff
Nenue@70 359 end
Nenue@70 360 end
Nenue@70 361
Nenue@74 362 numBuffs = 0
Nenue@70 363 for i = 1, DEBUFF_ACTUAL_DISPLAY do
Nenue@70 364 local debuff = _G['DebuffButton'..i]
Nenue@70 365 if debuff then
Nenue@74 366 numBuffs = numBuffs + 1
Nenue@74 367 if numBuffs == 1 then
Nenue@70 368 if topBuff then
Nenue@71 369 debuff:SetPoint('TOPRIGHT', topBuff, 'BOTTOMRIGHT', 0, -BUFF_BUTTON_SPACING_V)
Nenue@70 370 else
Nenue@70 371 debuff:SetPoint('TOPRIGHT', UIParent, 'TOPRIGHT', -120, -6)
Nenue@70 372 end
Nenue@70 373 topBuff = debuff
Nenue@75 374 elseif mod(numBuffs, BUFFS_PER_ROW) == 1 then
Nenue@71 375 debuff:SetPoint('TOPRIGHT', topBuff, 'BOTTOMRIGHT', 0, -BUFF_BUTTON_SPACING_V)
Nenue@70 376 topBuff = debuff
Nenue@70 377 else
Nenue@71 378 debuff:SetPoint('TOPRIGHT', lastBuff, 'TOPLEFT', -BUFF_BUTTON_SPACING_H, 0)
Nenue@70 379 end
Nenue@70 380 lastBuff = debuff
Nenue@70 381 end
Nenue@70 382 end
Nenue@70 383
Nenue@74 384 if lastBuff then
Nenue@74 385 plugin.currentBottom = lastBuff:GetBottom()
Nenue@74 386 end
Nenue@59 387 end
Nenue@59 388
Nenue@59 389 local AuraButton_UpdateDuration = function(frame, timeLeft)
Nenue@69 390 local veneer = GetVeneer(frame)
Nenue@60 391 local hours = floor(timeLeft/3600)
Nenue@60 392 local minutes = floor(mod(timeLeft, 3600)/60)
Nenue@60 393 local seconds = floor(mod(timeLeft, 60))
Nenue@60 394 local timeString = '%ds'
Nenue@59 395 if timeLeft > 3600 then
Nenue@60 396 timeString = format('%d:%02d', hours, minutes)
Nenue@60 397 elseif timeLeft > 60 then
Nenue@60 398 timeString = format('%d:%02d', minutes, seconds)
Nenue@61 399 else
Nenue@60 400 timeString = format('%d', seconds)
Nenue@59 401 end
Nenue@59 402
Nenue@74 403 if timeLeft < 10 then
Nenue@74 404 if not veneer.duration.getHuge then
Nenue@74 405 veneer.duration.getHuge = true
Nenue@74 406 veneer.duration:SetFontObject(VeneerNumberFontLarge)
Nenue@75 407 veneer.duration:SetTextColor(1,1,0,1)
Nenue@74 408 end
Nenue@74 409 else
Nenue@74 410 if veneer.duration.getHuge then
Nenue@74 411 veneer.duration.getHuge = nil
Nenue@74 412 veneer.duration:SetFontObject(VeneerNumberFont)
Nenue@74 413 veneer.duration:SetTextColor(1,1,1,1)
Nenue@74 414 end
Nenue@74 415
Nenue@74 416 end
Nenue@74 417
Nenue@60 418
Nenue@69 419 veneer.duration:SetText(timeString)
Nenue@59 420 end
Nenue@59 421
Nenue@59 422
Nenue@59 423 -- Obtains the first instance of Tenchant use
Nenue@59 424
Nenue@59 425 local TemporaryEnchantFrame_Update = function(...)
Nenue@59 426 local numVals = select('#', ...)
Nenue@59 427 local numItems = numVals / 4
Nenue@59 428 if numItems >= 1 then
Nenue@59 429 for itemIndex = numItems, 1, -1 do
Nenue@59 430 local frame = _G['TempEnchant'..itemIndex]
Nenue@59 431 local hasEnchant, timeRemaining, enchantCharges = select((4 * (itemIndex -1)) + 1, ...)
Nenue@59 432
Nenue@59 433
Nenue@59 434 if hasEnchant then
Nenue@59 435 local endTime = floor(GetTime()*1000) + timeRemaining
Nenue@59 436
Nenue@59 437
Nenue@59 438 --print(endTime)
Nenue@59 439 if endTime ~= expirationCache[frame] then
Nenue@59 440 if expirationCache[frame] then
Nenue@59 441 print(endTime, expirationCache[frame], endTime - expirationCache[frame])
Nenue@59 442 end
Nenue@59 443 expirationCache[frame] = endTime
Nenue@59 444 print('push tempenchant timer update', timeRemaining / 1000, GetTime()+(timeRemaining/1000))
Nenue@59 445 UpdateVeneer(frame, timeRemaining/1000, GetTime()+(timeRemaining/1000))
Nenue@59 446 end
Nenue@59 447 else
Nenue@59 448 GetVeneer(frame):Hide()
Nenue@59 449 end
Nenue@59 450
Nenue@59 451 end
Nenue@59 452
Nenue@59 453 end
Nenue@59 454
Nenue@59 455 end
Nenue@59 456
Nenue@59 457 local BuffFrame_Update = function(...)
Nenue@61 458
Nenue@59 459 end
Nenue@59 460
Nenue@59 461
Nenue@59 462 hooksecurefunc("BuffFrame_Update", BuffFrame_Update)
Nenue@59 463 hooksecurefunc("AuraButton_UpdateDuration", AuraButton_UpdateDuration)
Nenue@59 464 hooksecurefunc("AuraButton_Update", AuraButton_Update)
Nenue@59 465 hooksecurefunc("BuffFrame_UpdateAllBuffAnchors", BuffFrame_UpdateAllBuffAnchors)
Nenue@59 466 hooksecurefunc("TemporaryEnchantFrame_Update", TemporaryEnchantFrame_Update)
Nenue@59 467
Nenue@59 468 -- The TempEnchant frames are hardcoded in the base FrameXML, so get them now
Nenue@59 469 for i = 1, 3 do
Nenue@59 470
Nenue@59 471 SkinFrame('TempEnchant'..i)
Nenue@68 472 _G['TempEnchant'..i..'Border']:SetVertexColor(0.5,0,1,1)
Nenue@59 473
Nenue@59 474 end
Nenue@59 475
Nenue@59 476 plugin.init = function ()
Nenue@61 477
Nenue@61 478
Nenue@61 479
Nenue@59 480 plugin.db = vn.db[PLUGIN_NAME]
Nenue@59 481 end