-- Do not remove this comment, it is part of this trigger: RaidCDs_Engine
function (_, _, eventType, _, _, sourceName, _, _, _, destName, _, _, spellID, spellName)
if (not UnitInParty(sourceName)) then return false end
if (_raidCDs_cds == nil) then _raidCDs_cds = { } end
--
-- External CDs --
--
if(spellID == 47788 and eventType == "SPELL_CAST_SUCCESS" and _enableCDs_GS) then
-- Guardian Spirit --
if (_raidCDs_cds["Guardian Spirit"] == nil) then _raidCDs_cds["Guardian Spirit"] = { } end
_raidCDs_cds["Guardian Spirit"][sourceName] = GetTime() + 180;
elseif(spellID == 114030 and eventType == "SPELL_CAST_SUCCESS" and _enableCDs_Vig) then
-- Бдительность --
if (_raidCDs_cds["Бдительность"] == nil) then _raidCDs_cds["Бдительность"] = { } end
_raidCDs_cds["Бдительность"][sourceName] = GetTime() + 120;
elseif(spellID == 102342 and eventType == "SPELL_CAST_SUCCESS" and _enableCDs_Ibark) then
-- Железная кора--
if (_raidCDs_cds["Железная кора"] == nil) then _raidCDs_cds["Железная кора"] = { } end
_raidCDs_cds["Железная кора"][sourceName] = GetTime() + 60;
elseif(spellID == 33206 and eventType == "SPELL_CAST_SUCCESS" and _enableCDs_PS) then
-- Подавление боли --
if (_raidCDs_cds["Подавление боли"] == nil) then _raidCDs_cds["Подавление боли"] = { } end
_raidCDs_cds["Подавление боли"][sourceName] = GetTime() + 180;
elseif(spellID == 116849 and eventType == "SPELL_CAST_SUCCESS" and _enableCDs_LC) then
-- Исцеляющий кокон --
if (_raidCDs_cds["Исцеляющий кокон"] == nil) then _raidCDs_cds["Исцеляющий кокон"] = { } end
_raidCDs_cds["Исцеляющий кокон"][sourceName] = GetTime() + 180;
elseif(spellID == 6940 and eventType == "SPELL_CAST_SUCCESS" and _enableCDs_HoS) then
-- Длань жертвенности --
if (_raidCDs_cds["Длань жертвенности"] == nil) then _raidCDs_cds["Длань жертвенности"] = { } end
if (_raidCDs_retPaladins == nil) then _raidCDs_retPaladins = { } end
if (_raidCDs_retPaladins[sourceName] == "true") then
local rSac1 = _raidCDs_cds["Длань жертвенности"][sourceName.."_r1_"];
local rSac2 = _raidCDs_cds["Длань жертвенности"][sourceName.."_r2_"];
if (rSac1 ~= nil and rSac1 > GetTime()) then
_raidCDs_cds["Длань жертвенности"][sourceName.."_r2_"] = rSac1 + 90;
elseif (rSac2 ~= nil and rSac2 > GetTime()) then
_raidCDs_cds["Длань жертвенности"][sourceName.."_r1_"] = rSac2 + 90;
else
_raidCDs_cds["Длань жертвенности"][sourceName.."_r1_"] = GetTime() + 90;
end
else
local nSac1 = _raidCDs_cds["Длань жертвенности"][sourceName.."_n1_"];
local nSac2 = _raidCDs_cds["Длань жертвенности"][sourceName.."_n2_"];
if (nSac1 ~= nil and nSac1 > GetTime()) then
_raidCDs_cds["Длань жертвенности"][sourceName.."_n2_"] = nSac1 + 120;
elseif (nSac2 ~= nil and nSac2 > GetTime()) then
_raidCDs_cds["Длань жертвенности"][sourceName.."_n1_"] = nSac2 + 120;
else
_raidCDs_cds["Длань жертвенности"][sourceName.."_n1_"] = GetTime() + 120;
end
end
elseif (spellID == 1022 and eventType == "SPELL_CAST_SUCCESS" and _enableCDs_HoP) then
-- Длань защиты --
if (_raidCDs_cds["Длань защиты"] == nil) then _raidCDs_cds["Длань защиты"] = { } end
local nHoP1 = _raidCDs_cds["Длань защиты"][sourceName.."_n1_"];
local nHoP2 = _raidCDs_cds["Длань защиты"][sourceName.."_n2_"];
if (nHoP1 ~= nil and nHoP1 > GetTime()) then
_raidCDs_cds["Длань защиты"][sourceName.."_n2_"] = nHoP1 + 300;
elseif (nHoP2 ~= nil and nHoP2 > GetTime()) then
_raidCDs_cds["Длань защиты"][sourceName.."_n1_"] = nHoP2 + 300;
else
_raidCDs_cds["Длань защиты"][sourceName.."_n1_"] = GetTime() + 300;
end
elseif(eventType == "SPELL_CAST_SUCCESS" and
(spellID == 53385 or spellID == 122032 or spellID == 85256)) then
-- Found a Ret Paladin --
if (_raidCDs_cds["Длань жертвенности"] == nil) then _raidCDs_cds["Длань жертвенности"] = { } end
if (_raidCDs_retPaladins == nil) then _raidCDs_retPaladins = { } end
_raidCDs_retPaladins[sourceName] = "true";
local nSac1 = _raidCDs_cds["Длань жертвенности"][sourceName.."_n1_"];
local nSac2 = _raidCDs_cds["Длань жертвенности"][sourceName.."_n2_"];
if (nSac1 ~= nil) then
_raidCDs_cds["Длань жертвенности"][sourceName.."_r1_"] = nSac1 - 30;
_raidCDs_cds["Длань жертвенности"][sourceName.."_n1_"] = nil;
end
if (nSac2 ~= nil) then
_raidCDs_cds["Длань жертвенности"][sourceName.."_r2_"] = nSac2 - 30;
_raidCDs_cds["Длань жертвенности"][sourceName.."_n2_"] = nil;
end
elseif((eventType == "SPELL_CAST_SUCCESS" and
(spellID == 31935 or spellID == 26573 or spellID == 119072 or spellID == 53600 or spellID == 20473)) or
(eventType == "SPELL_CAST_START" and (spellID == 82326 or spellID == 82327 or spellID == 85222))) then
-- Found a Prot/Holy Paladin --
if (_raidCDs_cds["Длань жертвенности"] == nil) then _raidCDs_cds["Длань жертвенности"] = { } end
if (_raidCDs_retPaladins == nil) then _raidCDs_retPaladins = { } end
_raidCDs_retPaladins[sourceName] = nil;
local rSac1 = _raidCDs_cds["Длань жертвенности"][sourceName.."_r1_"];
local rSac2 = _raidCDs_cds["Длань жертвенности"][sourceName.."_r2_"];
if (rSac1 ~= nil) then
_raidCDs_cds["Длань жертвенности"][sourceName.."_n1_"] = rSac1 + 30;
_raidCDs_cds["Длань жертвенности"][sourceName.."_r1_"] = nil;
end
if (rSac2 ~= nil) then
_raidCDs_cds["Длань жертвенности"][sourceName.."_n2_"] = rSac2 + 30;
_raidCDs_cds["Длань жертвенности"][sourceName.."_r2_"] = nil;
end
--
-- Raid CDs --
--
elseif (spellID == 64843 and eventType == "SPELL_AURA_APPLIED" and _enableCDs_Hymn) then
-- Divine Hymn --
if (_raidCDs_cds["Divine Hymn"] == nil) then _raidCDs_cds["Divine Hymn"] = { } end
_raidCDs_cds["Divine Hymn"][sourceName] = GetTime() + 180;
elseif (spellID == 740 and eventType == "SPELL_AURA_APPLIED" and _enableCDs_Tranq) then
-- Tranquility --
if (_raidCDs_cds["Tranquility"] == nil) then _raidCDs_cds["Tranquility"] = { } end
_raidCDs_cds["Tranquility"][sourceName] = GetTime() + 180;
elseif(spellID == 97462 and eventType == "SPELL_CAST_SUCCESS" and _enableCDs_RallyCry) then
-- Rallying Cry --
if (_raidCDs_cds["Rallying Cry"] == nil) then _raidCDs_cds["Rallying Cry"] = { } end
_raidCDs_cds["Rallying Cry"][sourceName] = GetTime() + 180;
elseif(spellID == 51052 and eventType == "SPELL_CAST_SUCCESS" and _enableCDs_AMZ) then
-- Anti-Magic Zone --
if (_raidCDs_cds["Anti-Magic Zone"] == nil) then _raidCDs_cds["Anti-Magic Zone"] = { } end
_raidCDs_cds["Anti-Magic Zone"][sourceName] = GetTime() + 120;
elseif(spellID == 172106 and eventType == "SPELL_CAST_SUCCESS" and _enableCDs_Fox) then
-- Aspect of the Fox --
if (_raidCDs_cds["Aspect of the Fox"] == nil) then _raidCDs_cds["Aspect of the Fox"] = { } end
_raidCDs_cds["Aspect of the Fox"][sourceName] = GetTime() + 180;
elseif(spellID == 159916 and eventType == "SPELL_CAST_SUCCESS" and _enableCDs_Amp) then
-- Amplify Magic --
if (_raidCDs_cds["Amplify Magic"] == nil) then _raidCDs_cds["Amplify Magic"] = { } end
_raidCDs_cds["Amplify Magic"][sourceName] = GetTime() + 120;
elseif(spellID == 31821 and eventType == "SPELL_CAST_SUCCESS" and _enableCDs_Dev) then
-- Devotion Aura --
if (_raidCDs_cds["Devotion Aura"] == nil) then _raidCDs_cds["Devotion Aura"] = { } end
_raidCDs_cds["Devotion Aura"][sourceName] = GetTime() + 180;
elseif(spellID == 108280 and eventType == "SPELL_CAST_SUCCESS" and _enableCDs_Tide) then
-- Healing Tide --
if (_raidCDs_cds["Healing Tide"] == nil) then _raidCDs_cds["Healing Tide"] = { } end
_raidCDs_cds["Healing Tide"][sourceName] = GetTime() + 180;
elseif(spellID == 62618 and eventType == "SPELL_CAST_SUCCESS" and _enableCDs_PWB) then
-- Power Word: Barrier --
if (_raidCDs_cds["Power Word: Barrier"] == nil) then _raidCDs_cds["Power Word: Barrier"] = { } end
_raidCDs_cds["Power Word: Barrier"][sourceName] = GetTime() + 180;
elseif(spellID == 98008 and eventType == "SPELL_CAST_SUCCESS" and _enableCDs_SLT) then
-- Spirit Link Totem --
if (_raidCDs_cds["Spirit Link Totem"] == nil) then _raidCDs_cds["Spirit Link Totem"] = { } end
local nSLT1 = _raidCDs_cds["Spirit Link Totem"][sourceName.."_n1_"];
local nSLT2 = _raidCDs_cds["Spirit Link Totem"][sourceName.."_n2_"];
if (nSLT1 ~= nil and nSLT1 > GetTime()) then
_raidCDs_cds["Spirit Link Totem"][sourceName.."_n2_"] = nSLT1 + 180;
elseif (nSLT2 ~= nil and nSLT2 > GetTime()) then
_raidCDs_cds["Spirit Link Totem"][sourceName.."_n1_"] = nSLT2 + 180;
else
_raidCDs_cds["Spirit Link Totem"][sourceName.."_n1_"] = GetTime() + 180;
end
elseif(spellID == 76577 and eventType == "SPELL_CAST_SUCCESS" and _enableCDs_SBomb) then
-- Smoke Bomb --
if (_raidCDs_cds["Smoke Bomb"] == nil) then _raidCDs_cds["Smoke Bomb"] = { } end
_raidCDs_cds["Smoke Bomb"][sourceName] = GetTime() + 180;
elseif(spellID == 115310 and eventType == "SPELL_CAST_SUCCESS" and _enableCDs_Revival) then
-- Revival --
if (_raidCDs_cds["Revival"] == nil) then _raidCDs_cds["Revival"] = { } end
_raidCDs_cds["Revival"][sourceName] = GetTime() + 180;
elseif(spellID == 15286 and eventType == "SPELL_CAST_SUCCESS" and _enableCDs_Vamp) then
-- Vampiric Embrace --
if (_raidCDs_cds["Vampiric Embrace"] == nil) then _raidCDs_cds["Vampiric Embrace"] = { } end
_raidCDs_cds["Vampiric Embrace"][sourceName] = GetTime() + 180;
elseif(spellID == 106898 and eventType == "SPELL_CAST_SUCCESS" and _enableCDs_StampRoar) then
-- Stampeding Roar --
if (_raidCDs_cds["Stampeding Roar"] == nil) then _raidCDs_cds["Stampeding Roar"] = { } end
_raidCDs_cds["Stampeding Roar"][sourceName] = GetTime() + 120;
elseif(spellID == 114052 and eventType == "SPELL_CAST_SUCCESS" and _enableCDs_Ascendance) then
-- Ascendance --
if (_raidCDs_cds["Ascendance"] == nil) then _raidCDs_cds["Ascendance"] = { } end
_raidCDs_cds["Ascendance"][sourceName] = GetTime() + 180;
end
end
-- Do not remove this comment, it is part of this trigger: RaidCDs_EncounterEnd
function (_,_,_, raidType)
if (raidType > 17 or raidType < 14) then
return false;
end
for cdName, cdData in pairs(_raidCDs_cds) do
if (cdData ~= nil) then
local reset = true;
if (cdName == "Stampeding Roar") then reset = false end
if (cdName == "Бдительность") then reset = false end
if (cdName == "Железная кора") then reset = false end
if (cdName == "Длань жертвенности") then reset = false end
if (cdName == "Длань жертвенности") then reset = false end
if (cdName == "Anti-Magic Zone") then reset = false end
if (cdName == "Amplify Magic") then reset = false end
if (cdName == "Amplify Magic") then reset = false end
if (reset) then
for name, cdTime in pairs(cdData) do
_raidCDs_cds[cdName][name] = GetTime();
end
end
end
end
return false;
end
-- Do not remove this comment, it is part of this trigger: RaidCDs_GroupPoll
function()
return true;
end
-- Do not remove this comment, it is part of this trigger: RaidCDs_OptionsPoll
function()
return true;
end
Изменил именно там где мне нужно, но все равно не работает