cleanup Spell Activation

This commit is contained in:
Bunny67
2020-06-17 01:49:26 +03:00
parent 01a3d76ec6
commit e431386376
-34
View File
@@ -2484,40 +2484,6 @@ do
end
end
do
local spellActivationSpells = {};
local spellActivationSpellsCurrent = {};
local spellActivationFrame;
local function InitSpellActivation()
spellActivationFrame = CreateFrame("FRAME");
WeakAuras.frames["Spell Activation"] = spellActivationFrame;
spellActivationFrame:RegisterEvent("SPELL_ACTIVATION_OVERLAY_GLOW_SHOW");
spellActivationFrame:RegisterEvent("SPELL_ACTIVATION_OVERLAY_GLOW_HIDE");
spellActivationFrame:SetScript("OnEvent", function(self, event, spell)
WeakAuras.StartProfileSystem("generictrigger");
if (spellActivationSpells[spell]) then
spellActivationSpellsCurrent[spell] = (event == "SPELL_ACTIVATION_OVERLAY_GLOW_SHOW");
WeakAuras.ScanEvents("WA_UPDATE_OVERLAY_GLOW", spell);
end
WeakAuras.StopProfileSystem("generictrigger");
end);
end
function WeakAuras.WatchSpellActivation(id)
if (not id) then
return;
end
if (not spellActivationFrame) then
InitSpellActivation();
end
spellActivationSpells[id] = true;
end
function WeakAuras.SpellActivationActive(id)
return spellActivationSpellsCurrent[id];
end
end
local watchUnitChange
-- Nameplates only distinguish between friends and everyone else