/
addon.spells[25218] = {duration=30,cooldown=15,type="BUFF"}; -- PW: Shield |
addon.spells[14751] = {cooldown=180,instant=true,type="CAST"}; -- Inner Focus |
addon.spells[33206] = {duration=8,cooldown=120,type="BUFF"}; -- Pain Suppression |
addon.spells[25368] = {duration=18,type="DEBUFF"}; -- SW: Pain |
addon.spells[25368] = {duration=18,type="DEBUFF",dot=true}; -- SW: Pain |
addon.spells[32996] = {cooldown=12,instant=true,type="CAST"}; -- SW: Death |
addon.spells[25375] = {cooldown=8,instant=true,type="CAST"}; -- Mind blast |
addon.spells[34433] = {duration=15,cooldown=300,instant=true,type="CAST"}; -- Shadowfiend |
addon.spells[34433] = {duration=15,cooldown=300,instant=true,type="CAST",special=true}; -- Shadowfiend |
addon.spells[10890] = {duration=8,cooldown=27,instant=true,type="CAST"}; -- Fear |
else |
duration = spell.duration; |
end |
-- DR? |
if (spell.drcat) and (NaturDB.Diminishing) then |
-- DR? only on target. |
if (dstGUID == UnitGUID("target")) and (spell.drcat) and (NaturDB.Diminishing) then |
addon:ApplyDiminish(spell.id, dstName, dstGUID); |
duration = duration * addon.factor; |
end |
-- Add cooldown to the CDTable so we can remove/show on target change |
addon:StartParsing("SPELL_CAST_SUCCESS", function(when,what,srcGUID,srcName,srcFlags,dstGUID,dstName,dstFlags,...) |
local spell = addon:GetSpellData(...); |
--Quick fix for refreshing spells until 2.4.3 SPELL_AURA_REFRESH |
if (dstGUID == UnitGUID("target") or dstGUID == UnitGUID("focus")) and (dstGUID ~= UnitGUID("player")) then |
addon.group:SetTime(dstGUID..spell.id, spell.duration); |
end |
----------- |
if (spell.special) and (srcGUID == UnitGUID("player")) then -- show this even tho the player casted it. |
local color = addon.colors["FRIENDLYBUFF"]; |
local text = spell.name .. " - " .. srcName; |
addon.group:RegisterBar(srcGUID..spell.id, text, spell.duration, nil, spell.icon, color.r, color.g, color.b); |
end |
if (srcGUID == UnitGUID("player")) then return; end |
if (srcGUID == UnitGUID("target")) then --We don't want to show cooldowns for our focus.. maybe change this if someone requests it. |
if (spell) and (spell.cooldown) then |
if (addon.spelldata[k].drcat) then |
addon.group:UnregisterBar(dstGUID..addon.spelldata[k].drcat); |
end |
CDTable[dstGUID..k.."CD"] = nil; |
end |
end); |
---------------------------------------------------------------------------------------------------- |
end |
function GTB.ShowBar(group, id, timer) |
if not origBarID[id] then return end |
local time = origBarID[id].timer - (GetTime() - origBarID[id].update) |
-- group, id, text, 60, 54, icon, r, g, b |
GTB.RegisterBar(group, id, origBarID[id].text, time, timer, origBarID[id].icon, origBarID[id].color.r, origBarID[id].color.g, origBarID[id].color.b) |