Код:
----------------------------------------------------
-- Interrupt Bar by Kollektiv
-- Modifications by Veliace/Romiculum
----------------------------------------------------
InterruptBarDB = InterruptBarDB or { scale = 1, hidden = false, lock = false, }
local abilities = {}
local order
local band = bit.band
local spellids = {[6552] = 10, [2139] = 24, [19647] = 24, [16979] = 15, [1766] = 10, [47528] = 10, [72] = 12, [18499] = 30, [48020] = 30, [57994] = 6, [15487] = 45, [8643] = 20, [61384] = 20, [49802] = 10, [44572] = 30, [10890] = 27, [34490] = 20, [51514] = 45}
for spellid,time in pairs(spellids) do
local name,_,spellicon = GetSpellInfo(spellid)
abilities[name] = { icon = spellicon, duration = time }
end
-----------------------------------------------------
-- Edit this table to change the order
-----------------------------------------------------
-- 6552 Pummel
-- 2139 Counterspell
-- 19647 Spell Lock
-- 16979 Feral Charge
-- 1766 Kick
-- 47528 Mind Freeze
-- 72 Shield Bash
-- 18499 Berserker Rage
-- 48020 Demonic Circle: Teleport
-- 57994 Wind Shear
-- 15487 Silence
-- 8643 Kidney shot
-- 61384 Typhoon
-- 49802 Maim
-- 44572 Deep Freeze
-- 10890 Fear
-- 34490 Silence shot
-- 51514 Hex
-----------------------------------------------------
local order = {6552, 2139, 19647, 1766, 47528, 16979, 72, 18499, 48020, 57994, 15487, 8643, 61384, 49802, 44572, 10890, 34490, 51514}
-----------------------------------------------------
-----------------------------------------------------
for k,v in ipairs(order) do order[k] = GetSpellInfo(v) end
local frame
local bar
local GetTime = GetTime
local ipairs = ipairs
local pairs = pairs
local select = select
local floor = floor
local band = bit.band
local GetSpellInfo = GetSpellInfo
local GROUP_UNITS = bit.bor(0x00000010, 0x00000400)
local activetimers = {}
local size = 0
local function getsize()
size = 0
for k in pairs(activetimers) do
size = size + 1
end
end
local function InterruptBar_AddIcons()
local x = -45
local y = 0
local r = 0
for _,ability in ipairs(order) do
local btn = CreateFrame("Frame",nil,bar)
btn:SetWidth(30)
btn:SetHeight(30)
if x < (InterruptBarDB.columns * 30 - 45) then
btn:SetPoint("CENTER",bar,"CENTER",x,y)
else
x = x-(InterruptBarDB.columns * 30)
y = y-30
btn:SetPoint("Center",bar,"Center",x,y)
end
btn:SetFrameStrata("LOW")
[свернуть]