X-Git-Url: https://www.aleksib.fi/git/wowui.git/blobdiff_plain/c39801df4486661ba42940fa59d24536e27131a1..3c2cef6ffb99d6e8febf3a4df2b4b51ee0b9c2aa:/kehys/frame.lua?ds=inline diff --git a/kehys/frame.lua b/kehys/frame.lua index 535899c..57578c7 100644 --- a/kehys/frame.lua +++ b/kehys/frame.lua @@ -24,14 +24,15 @@ function addon.NewRaidFrame(parent, width, height, unit, attributes, assert(type(width) == "number", "Frame creation missing width!"); assert(type(height) == "number", "Frame creation missing height!"); assert(type(unit) == "string", "Frame creation missing unit!"); - assert(type(attributes) == "table", - "Frame creation missing attributes table!"); assert(type(update) == "function", "Frame creation missing update function!"); assert(type(event) == "function", "Frame creation missing event function!"); assert(type(onshow) == "function", "Frame creation missing onshow function!"); + if type(attributes) ~= "table" then + attributes = {}; + end local f = CreateFrame( "Button", @@ -50,6 +51,7 @@ function addon.NewRaidFrame(parent, width, height, unit, attributes, f.vehicle = unit == "player" and "vehicle" or format("%spet", unit); f.prev = {} -- values stored from previous update f.alert = {}; -- alerting auras + f.heal = {}; -- high healing auras -- set up periodic updates updaters[f] = function() if f.updating then