/
local parentName = addon['parentName'] or "BrokerPack" |
local childName = "zz_BuffInfo" |
local defaults = {} |
local _G = _G |
local delayOOC = 0.75 |
local delayIC = 0.5 |
local delay = delayOOC |
local g = GetTime() |
-- name, rank, icon, cost, isFunnel, powerType, castTime, minRange, maxRange = GetSpellInfo(spellId or spellName) |
local auras = { |
-- tank |
[76691] = {GetSpellInfo(76691)}, -- rache |
-- monk |
[115295] = {GetSpellInfo(115295)}, -- schutz |
[124275] = {GetSpellInfo(124275)}, -- leichte staffelung |
[124273] = {GetSpellInfo(124273)}, -- schwere staffelung |
-- warrior |
[112048] = {GetSpellInfo(112048)}, -- schildbarriere |
-- enchants |
[116631] = {GetSpellInfo(116631)}, -- colossus |
} |
local function updateDisplay(self,event,...) |
b['vText'..n]:SetJustifyH("LEFT") |
b['vText'..n]:SetTextColor(1,1,1,1) |
end |
local lastbutton |
local lastbutton, defbutton |
local function createButton(spellId) |
local b = CreateFrame("Button", "BuffInfo_"..auras[spellId][1], UIParent, "ActionButtonTemplate") |
b:SetSize(24,24) |
if(aurainfo[1]) then |
b:Show() |
for n = 1, 3 do |
b['vText'..n]:SetText(aurainfo[13 + n]) |
b['vText'..n]:SetText(aurainfo[14 + n]) |
end |
checked[spellId] = true |
b:ClearAllPoints() |
['icon'] = "Interface\\Icons\\spell_holy_powerwordshield", |
}) |
db = addon['db']['profile'][childName] |
defbutton = CreateFrame("Frame", name.."DragBar") |
defbutton['db'] = db |
defbutton['dragAble'] = function() return true end |
defbutton:SetSize(30,20) |
defbutton:SetPoint("CENTER", UIParent, "CENTER") |
addon['AddDrag'](defbutton) |
addon['RegisterFunc']({"PLAYER_REGEN_ENABLED", "PLAYER_REGEN_DISABLED"},"OnEvent", updateDisplay) |
addon['RegisterFunc'](nil,"OnUpdate", OnUpdate)['nextUpdate'] = GetTime() |
end |