annotate Modules/BuffFrame.lua @ 69:ebc18a7412a1

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